Permalink
Browse files

Merge branch 'master' of github.com:photo/frontend

  • Loading branch information...
2 parents 5d20432 + 931e5d7 commit c5389144b065161f8b4d7eee9089cfabb477ec81 @jmathai jmathai committed Jan 21, 2013
View
@@ -13,7 +13,7 @@
# Run this from the command line as root.
# As always, view any script before running it ;).
- curl https://raw.github.com/openphoto/frontend/master/documentation/guides/InstallationUbuntuApache.sh | /bin/bash
+ curl https://raw.github.com/photo/frontend/master/documentation/guides/InstallationUbuntuApache.sh | /bin/bash
----------------------------------------
@@ -38,15 +38,15 @@ _Authentication: required_
* This can be the binary photo in multipart/formdata
* This can be the base64 encoded value of the photo in application/x-www-form-urlencoded
1. permission (optional), 0 for private and 1 for public.
-1. title (optional), _i.e. My first day at work_ - A string title to describe the photo.
-1. description (optional), _i.e. A much longer description of my first day_ - A string to describe the photo in detail.
-1. tags (optional), _i.e. dog,cat_ - A comma delimited string of alpha numeric strings.
+1. title (optional), _e.g. My first day at work_ - A string title to describe the photo.
+1. description (optional), _e.g. A much longer description of my first day_ - A string to describe the photo in detail.
+1. tags (optional), _e.g. dog,cat_ - A comma delimited string of alpha numeric strings.
1. dateUploaded (optional), _i.e. 1311059035_ - A unix timestamp of the date the photo was uploaded
-1. dateTaken (optional), _i.e. 1311059035_ - A unix timestamp of the date the photo was taken which overrides EXIF data if present
-1. license (optional), _i.e. CC BY-SA or My Custom License_ - A string representing a custom or Creative Commons license.
-1. latitude (optional), _i.e. 34.76_ - A decimal representation of latitude.
-1. longitude (optional), _i.e. -87.45_ - A decimal representation of longitude.
-1. returnSizes (optional), _i.e. 200x200,300x300xBW_ - A string instructing specific versions of the photo to be autogenerated.
+1. dateTaken (optional), _e.g. 1311059035_ - A unix timestamp of the date the photo was taken which overrides EXIF data if present
+1. license (optional), _e.g. CC BY-SA or My Custom License_ - A string representing a custom or Creative Commons license.
+1. latitude (optional), _e.g. 34.76_ - A decimal representation of latitude.
+1. longitude (optional), _e.g. -87.45_ - A decimal representation of longitude.
+1. returnSizes (optional), _e.g. 200x200,300x300xBW_ - A string instructing specific versions of the photo to be autogenerated.
To specify multiple sizes then separate each with a comman.
The url will be present in the response.
* 300x300 - A photo which maintains aspect ratio and fits inside a 300x300 square
@@ -1,4 +1,4 @@
-Creae Tag
+Create Tag
=======================
@@ -46,13 +46,13 @@ _Authentication: required_
<a name="example-cli"></a>
#### Command Line (using [openphoto-php][openphoto-php])
- ./openphoto -p -X POST -h current.openphoto.me -e /tag/sunnyvale/create.json -F 'count=10'
+ ./openphoto -p -X POST -h current.openphoto.me -e /tag/create.json -F 'tag=sunnyvale' -F 'count=10'
<a name="example-php"></a>
#### PHP (using [openphoto-php][openphoto-php])
$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
- $response = $client->post("/tag/sunnyvale/create.json", array('count' => 10));
+ $response = $client->post("/tag/create.json", array('tag' => 'sunnyvale', 'count' => 10));
----------------------------------------
@@ -62,19 +62,19 @@ _Authentication: required_
The response is in a standard [response envelope](http://theopenphotoproject.org/documentation/api/Envelope).
* _message_, A string describing the result. Don't use this for anything but reading.
-* _code_, _200_ on success
+* _code_, _201_ on success
* _result_, A [Tag][Tag] object or FALSE on error
<a name="sample"></a>
#### Sample
{
"message":"",
- "code":200,
- "result":
+ "code":201,
+ "result":
{
"id": "mountain",
- "count": 1
+ "count": 0
}
}
@@ -49,7 +49,7 @@ Every API endpoint returns a JSON response in a [standard envelope](http://theop
#### Tag endpoints
1. [GET /tags/list.json](http://theopenphotoproject.org/documentation/api/GetTags)
Get a user's tags.
-1. [POST /tag/:id/create.json](http://theopenphotoproject.org/documentation/api/PostTagCreate)
+1. [POST /tag/create.json](http://theopenphotoproject.org/documentation/api/PostTagCreate)
Create a tag for the user.
1. [POST /tag/:id/update.json](http://theopenphotoproject.org/documentation/api/PostTagUpdate)
Modify meta data for a user's tag.
@@ -7,7 +7,7 @@ Alright, we get it. You'd rather code than read. Here's the checklist.
1. Fork the <a href="https://github.com/photo/frontend">frontend</a> repository. <a href="http://help.github.com/fork-a-repo/">More info on forking</a>.
1. Follow one of our <a href="/documentation">guides</a> on setting the software up.
1. Get coding!
-1. <a href="/contribute/frontend">More details</a> if you need.
+1. <a href="/contribute/frontend">More details</a> if you need them.
<div></div>
@@ -24,17 +24,17 @@ Alright, we get it. You'd rather code than read. Here's the checklist.
# as a result it maybe unstable so you can always use master which should work
user@[frontend] git checkout development
- # make your changes and commit then locally
+ # make your changes and commit them locally
user@[frontend] git commit -m 'Lots of details! Closes #123'
user@[frontend] git push origin development
Now you're ready to <a href="http://help.github.com/send-pull-requests/">send a pull request</a>!
## There's a spot for everyone to be a part of something BIG
-Hear ye, hear ye! <a href="#developers">Developers</a>, <a href="designers">designers</a>, <a href="#copywriters">copywriters</a>, <a href="#community">community managers</a>, <a href="#translators">translators</a>, and anyone else who wants to help. If you want to contribute to The OpenPhoto Project, the good news is that there's probably a place where we could use your help!
+Hear ye, hear ye! <a href="#developers">Developers</a>, <a href="#designers">designers</a>, <a name="#powerusers">power users</a>, <a href="#copywriters">copywriters</a>, <a href="#community">community managers</a>, <a href="#translators">translators</a>, and anyone else who wants to help. If you want to contribute to The OpenPhoto Project, the good news is that there's probably a place where we could use your help!
-It's easy to get in touch with us, as many of us hang out in #openphoto on Freenode. Don't hesitate to come and <a href="http://webchat.freenode.net/">chat with us</a>. We're happy to answer any questions you might have.
+It's easy to get in touch with us, as many of us hang out in #openphoto on Freenode. Come in and <a href="http://webchat.freenode.net/">chat with us</a>. We're happy to answer any questions you might have.
Here's a full list of ways to contact us:
@@ -65,16 +65,20 @@ That being said, the largest part of the code base is the <a href="https://githu
If you've got a gift with words we're in desperate need of your help. Much of the community consists of engineers and well, we suck at taking complex ideas and distilling them into small and easy to understand sentences.
-The best way to get started is to read the copy at the <a href="http://theopenphotoproject.org">The OpenPhoto Project</a> website. Some of it is technical, like the documentation, but much of it is also trying to explain why users should care about what we're building. Wherever your passion lies, we will definitely appreciate the help.
+The best way to get started is to read the copy at <a href="http://theopenphotoproject.org">The OpenPhoto Project</a>'s website. Some of it is technical, like the documentation, but much of it is also trying to explain why users should care about what we're building. Wherever your passion lies, we will definitely appreciate the help.
Everything can be found in the <a href="https://github.com/photo/community">community</a> repository for the non-technical bits or the <a href="https://github.com/photo/frontend">frontend</a> repository for the documentation.
-You can open an issue for the appropriate repository or fork it and send us a pull request. If you have any questions, let us know using one of the channels above.
+We have <a href="https://github.com/photo/frontend/issues?labels=Documentation&page=1&state=open">issues tagged documentation</a> on Github, but just about every area of the site needs some attention. You can open an issue for the appropriate repository or fork it and send us a pull request. If you have any questions, let us know using one of the channels above.
+
+<a name="powerusers"></a>
+## Power Users
+Do you know OpenPhoto inside out, including all its little quirks? Then we need you! A lot of people ask questions about OpenPhoto on our mailing list or on IRC, so hang out on those channels and help someone out. This is a great way to get to know other OpenPhoto users. You can also help out by filing Github issues when you find bugs and discussing them on our issues board.
<a name="community"></a>
## Community Managers and Social Media
-Send an email to <a href="mailto:hello@openphoto.me">hello@openphoto.me</a> or <a href="https://twitter.com/photo">@mention us</a> on Twitter if you'd like to help with Community Management or Social Media.
+Send an email to <a href="mailto:hello@openphoto.me">hello@openphoto.me</a> or <a href="https://twitter.com/openphoto">@mention us</a> on Twitter if you'd like to help with Community Management or Social Media.
<a name="translators"></a>
## Translators
@@ -3,23 +3,27 @@ Contributing to the Web and API components
## Up and contributing in under 5 minutes
-So what do you need to start contributing?
+So what do you need to get started?
A computer! Once you've secured one of those all you need is a Github account. It helps to have a locally installed version of the frontend repository to test your changes. We've got <a href="http://theopenphotoproject.org/documentation">lots of guides</a> to help you get started. If you're updating any of the PHP code you should get PHPUnit as well.
pear channel-discover pear.phpunit.de
+ pear channel-discover pear.bovigo.org
pear install pear.phpunit.de/PHPUnit
+ pear install bovigo/vfsStream-beta
# problems? check the links below
# http://www.phpunit.de/manual/3.6/en/installation.html
# http://stackoverflow.com/questions/3301300/setting-up-phpunit-on-osx
-Now that you've got the following we can continue.
+Now that you've got:
* A computer
* <a href="https://github.com">A GitHub account</a>
* An <a href="http://theopenphotoproject.org/documentation">installation of the frontend repository</a>
-* <a href="http://www.phpunit.de/manual/3.6/en/installation.html">PHPUnit</a>
+* <a href="http://www.phpunit.de/manual/3.6/en/installation.html">PHPUnit</a>,
+
+let's continue.
## Deciding what to fix
@@ -30,11 +34,32 @@ We've added a _Beginner_ label to issues that don't touch some of the more sensi
* <a href="https://github.com/photo/frontend/issues?labels=Beginner%2CJavaScript&sort=created&direction=desc&state=open&page=1">Beginner + JavaScript issues</a>
* <a href="https://github.com/photo/frontend/issues?labels=Beginner%2CPHP&sort=created&direction=desc&state=open&page=1">Beginner + PHP issues</a>
+## Things to keep in mind while you code
+Here's what your code should adhere to:
+
+* Unit tests should pass (more on that in the next section)
+* Spacing matters: two spaces, no tabs
+* Commits should reference an issue number (more on that below)
+* Comment your code so future developers can tell what's going on
+* Curly braces go on their own line. For example:
+````php
+ if(condition)
+ {
+ statement 1;
+ statement 2;
+ }
+
+ // or
+ if(condition)
+ only statement;
+````
+All in all, we recognize that everyone has a different style and level of experience, and we welcome all pull requests.
+
## Testing that your change didn't break anything
Once you've made your change and verified it does what it should it's time to make sure it's not doing something it shouldn't. This is as easy as a single command.
- phpunit src/tests
+ phpunit -c src/tests/phpunit.xml
............................................................ 60 / 311
............................................................ 120 / 311
............................................................ 180 / 311
@@ -47,14 +72,14 @@ Once you've made your change and verified it does what it should it's time to ma
OK, but incomplete or skipped tests!
Tests: 311, Assertions: 661, Incomplete: 4.
-Those `I`s are okay but you shouldn't see any `E`s or `F`s and definitely look for the _OK_ message at the end. If all the tests pass then you're good to go and can commit it.
+Those `I`s are okay but you shouldn't see any `E`s or `F`s and definitely look for the `OK` message at the end. If all the tests pass then you're good to go and can commit your changes.
-You can also automate this by adding a pre-commit hook. Just copy <a href="https://github.com/photo/frontend/blob/master/documentation/hooks/pre-commit">this file</a> into your `.git/hooks` directory or run the command below.
+You can automate this by adding a pre-commit hook. Just copy <a href="https://github.com/photo/frontend/blob/master/documentation/hooks/pre-commit">this file</a> into your `.git/hooks` directory or run the command below.
wget --no-check-certificate https://raw.github.com/photo/frontend/master/documentation/hooks/pre-commit -O .git/hooks/pre-commit
chmod u+x .git/hooks/pre-commit
-Now everytime you make a commit it will first run the unit tests, automatically.
+Now every time you make a commit it will first run the unit tests automatically.
## Committing your code
@@ -72,9 +97,9 @@ Be descriptive, it helps a ton. Once you've committed your code it's time to pus
## Getting your change into the OpenPhoto branch
-To get your change merged into the official OpenPhoto branch you should submit a pull request. <a href="http://help.github.com/send-pull-requests/"GitHub's tutorial</a> is better than anything we could do so we'll link to it.
+To get your change merged into the official OpenPhoto branch, submit a pull request. <a href="http://help.github.com/send-pull-requests/">GitHub's tutorial</a> is better than anything we could do so we'll link to it.
-It makes everyone's life easier if you can remember to issue the pull request to OpenPhoto's development. If you forget, no big deal. The important thing is we get your change and your awesomeness can be merged into everyone else's awesomeness.
+It makes everyone's lives easier if you can remember to issue the pull request to OpenPhoto's development branch. If you forget, no big deal. The important thing is we get your change and your awesomeness can be merged into everyone else's awesomeness.
## Help! I'm stuck and have questions
Oops, something went wrong.

0 comments on commit c538914

Please sign in to comment.