Skip to content

Locomotive API#511

Merged
did merged 61 commits intolocomotivecms:masterfrom
colibri-software:api
Nov 15, 2012
Merged

Locomotive API#511
did merged 61 commits intolocomotivecms:masterfrom
colibri-software:api

Conversation

@alexsanford
Copy link
Copy Markdown
Contributor

The Locomotive API is now much more usable. You can perform all the CRUD actions on almost any resource in the system, and there are some conveniences built in as well. I haven't written any docs yet, but the cucumber features do a pretty good job of outlining all the functionality. I'm hoping to write a guide for the Locomotive doc site eventually.

Here's a quick example of the usage. First get an authentication token:

% curl -d 'email=author@example.com&password=mypassword' http://test.vcap.me:3000/locomotive/api/tokens.json
=> {"token":"uks6zqFgQQdhmWYfZxpf"}

Then simply use that token to access a resource:

curl http://test.vcap.me:3000/locomotive/api/pages.json?auth_token=uks6zqFgQQdhmWYfZxpf

alexsanford added 30 commits May 2, 2012 10:29
@wrodenbusch
Copy link
Copy Markdown

Hi Alex!

I have been trying to run off of this branch but I am having some trouble getting the right gems in place. Do you have any ideas?

Bundler could not find compatible versions for gem "carrierwave-mongoid":
In Gemfile:
locomotive_cms (>= 0) ruby depends on
carrierwave-mongoid (~> 0.1.3) ruby

locomotive_cms (>= 0) ruby depends on
  carrierwave-mongoid (0.2.1)

Thanks,
Will

@wrodenbusch
Copy link
Copy Markdown

Seems that this is a more general RC7 problem. I may try to merge your branch up to RC12.

@alexsanford
Copy link
Copy Markdown
Contributor Author

I did that merge and fixed a few issues. I then started implementing some
new API stuff and didn't push up those fixes. I'll do that now.

On Tue, Oct 30, 2012 at 12:07 PM, Will Rodenbusch
notifications@github.comwrote:

Seems that this is a more general RC7 problem. I may try to merge your
branch up to RC12.


Reply to this email directly or view it on GitHubhttps://github.com//pull/511#issuecomment-9909048.

@wrodenbusch
Copy link
Copy Markdown

Thanks. Works great now.

Conflicts:
	app/controllers/locomotive/api/sites_controller.rb
	app/models/locomotive/editable_short_text.rb
	app/presenters/locomotive/account_presenter.rb
	features/step_definitions/api_steps.rb
did added a commit that referenced this pull request Nov 15, 2012
@did did merged commit c02906d into locomotivecms:master Nov 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants