Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add Rest API Endpoints #54

Merged
merged 31 commits into from
Jan 31, 2018
Merged

[WIP] Add Rest API Endpoints #54

merged 31 commits into from
Jan 31, 2018

Conversation

pgk
Copy link
Contributor

@pgk pgk commented Jul 18, 2017

Created Zoninator_Rest_Api_Controller class to represent the new rest API. Amended js code to use the new endpoints.

Endpoints

The following endpoints where created

  • POST /zoninator/v1/zones/:zone_id/posts (add post to zone)
  • GET /zoninator/v1/zones/:zone_id/posts (get zone feed)
  • GET /zoninator/v1/posts/search?term=:term (search term)
  • DELETE /zoninator/v1/zones/:zone_id/posts/:post_id (remove post from zone)
  • PUT /zoninator/v1/zones/:zone_id/posts/order (reorder posts)
  • PUT /zoninator/v1/zones/:zone_id/lock (lock zone)
  • GET /zoninator/v1/zones/:zone_id/posts/recent (recent posts for select box)

NOTE: Supplemented the zone feed endpoint with a RESTful endpoint. Did keep the
old zone feed rewrite rule though, as it might be used by third parties.

Other

  • Created PHPUnit tests for Zoninator_Rest_Api_Controller
  • Created a script to automate the test env setup (assumes Ubuntu and bash)
  • Created acceptance tests

@pgk pgk changed the title [WPI] Add Rest API Endpoints [WIP] Add Rest API Endpoints Jul 18, 2017
@pgk pgk force-pushed the add/rest-api branch 5 times, most recently from a1e71bf to f096570 Compare July 21, 2017 09:09
@pgk pgk requested a review from ice9js September 8, 2017 15:37
@pgk
Copy link
Contributor Author

pgk commented Sep 8, 2017

@ice9js let me know if the latest mixtape upgrade broke anything (you can install with npm install && ./node_modules/.bin/mixtape build). Worked for me :)

@ice9js ice9js merged commit 611c79a into master Jan 31, 2018
@ice9js ice9js deleted the add/rest-api branch January 31, 2018 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants