How to handle duplicate tags when creating tag in Asana API -
i using ruby wrapper "asana" create integration asana api. 1 problem when test tag creation through curl seems asana doesn't take care of duplicating tags. i.e. when following command twice. generate 2 tags different tag id. can asana detect duplicate tags , merge tasks together?
curl -u <my_api_key>: https://app.asana.com/api/1.0/tags \ -d "name=test tag" \ -d "workspace=123123123"
1st response:
{"data":{"id":11800363445095,"created_at":"2014-04-22t10:03:19.888z","name":"test tag","notes":"","....:[]}}%
2nd response:
{"data":{"id":11800365867646,"created_at":"2014-04-22t10:03:27.501z","name":"test tag","notes":"","....:[]}}%
note although tags have same name, have different ids. want if task created same tag name, fall on previous tag id.
tags, projects, true objects in asana - have own id, database entry, properties , forth, even if have same name.
this of course different other implementations of tags may familiar - , we're aware of , looking ways make tags uniquely identified name , workspace, people expect, that's not in immediate pipeline.
so can work around first getting tag list , creating if no tag name exists. of course that's not atomic, , it's inelegant, it's potential workaround.
a general wrapper api should assume same semantics api, rather try hide them, though.
Comments
Post a Comment