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

Already on GitHub? Sign in to your account

Support for tags resource #87

wants to merge 1 commit into


None yet
2 participants

benilovj commented May 20, 2013

This is conversation starter, rather than finished code.

I would like to be able to use the gem to access the Tags resource. I would like to contribute a fix for this, however I'm not sure about what I should test, etc.

I'm assuming that I wouldn't be able to run the "live" specs locally - would I need Zendesk-internal systems?


steved commented May 21, 2013

You're welcome to run the live specs against your own zendesk test account if you'd like, but yeah otherwise you'd need internal resources. Just need valid basic auth credentials in spec/fixtures/credentials.yml and you should be able run rake spec:live.

The addition to resources.rb would allow the following client.tags. However, the CUD methods of the tags CRUD
are only applicable when used as a sub-resource to organizations, topics, and tickets. I think there would have to be some special handling before we'd able to do something like:

class Organization
  has_many Tag

organization = client.organizations.first
organization.tags = ["tag1"] # POST /api/v2/organizations/1/tags with the payload { "tags": ["tag1"] }
organization.tags.push("tag1") # PUT /api/v2/organizations/1/tags with the payload { "tags": ["tag1"] }
organization.tags.delete("tag1") # DELETE /api/v2/organizations/1/tags with the payload { "tags": ["tag1"] }

steved commented Jun 21, 2013

@steved steved closed this Jun 21, 2013


benilovj commented Jun 21, 2013

Great, thanks

On Fri, Jun 21, 2013 at 11:24 PM, Steven Davidovitz
notifications@github.com wrote:

Merged my tags branch, check out the usage here: https://github.com/zendesk/zendesk_api_client_rb/blob/master/spec/live/tag_spec.rb

Reply to this email directly or view it on GitHub:
#87 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment