Skip to content
This repository has been archived by the owner on Apr 26, 2018. It is now read-only.

API is broken #1

Open
ndbroadbent opened this issue Dec 9, 2009 · 2 comments
Open

API is broken #1

ndbroadbent opened this issue Dec 9, 2009 · 2 comments

Comments

@ndbroadbent
Copy link

This API is broken. The following are examples of the errors that are given:

person = Person.find(3808)
=> #<BatchBook::Person:0xb740e4b4 ........

person.tags
ActiveResource::ResourceNotFound: Failed with 404 Not Found

person.supertags
ActiveResource::Redirection: Failed with 302 Moved Temporarily => https://cf.batchbook.com/service/people/3808/super_tags?action=index&contact_id=3808&controller=service%2Fsuper_tags&format=xml

person.locations
ActiveResource::Redirection: Failed with 302 Moved Temporarily => https://cf.batchbook.com/service/people/3808/locations

However, it seems that all 'unnested' resources still work as expected.
For example:
Todo.new.tags
Communication.new.tags
SuperTag.find(:all)
Location.find(2)
.. are all working.

Would you please consider fixing the API so that our company can test BatchBook? In the meantime I will try to fix the code myself, and if I am successful I can send you my changes.

@ndbroadbent
Copy link
Author

Hi, I have done my best to fix the API wrapper. You can find my changes in the forked project on github. However, I do believe that there are still some problems with your API. I have followed all of the API guides on http://developer.batchblue.com and some things are still not working, such as adding/removing tags. Would greatly appreciate it if you could help me with that. Thanks!

@ndbroadbent
Copy link
Author

Alright, I figured it out. Im sorry, but I found your API kind of hard to make sense of. I tried to follow this example with no luck:

I would have found it easier if you had instead written:
https://test.batchbook.com/service/people/#{id}/add_tag.xml?tag=#{super_tag_name}

Please look at my fork of the project for a working version of the API wrapper.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant