alicoding / node-transifex

Transifex API client for nodejs
MIT License
15 stars 9 forks source link

Question about creating resources #5

Closed zbyte64 closed 9 years ago

zbyte64 commented 9 years ago

Does the client expose a method for the following API?

http://docs.transifex.com/api/resources/#post

alicoding commented 9 years ago

Currently client only expose all the GET methods, but I'm happy to add them probably this weekend otherwise PR also welcome :)

zbyte64 commented 9 years ago

I implemented a resourceCreateMethod but I am not sure how we should unit test it. The test credentials don't have permission to create new resources so the unit test fails due to a 403. Should I just mock this and is there a preferred mock library?

alicoding commented 9 years ago

Hey @zbyte64 sorry for the late reply.

I figured that credentials would have permission problem and even if we set the right permission it might still be a bit of a problem since we need to make sure we remove that project later, but mocking would be better anyway I think.

I don't really have anything in mind for mocking library, so let's choose something that would work I guess :+1: