Put to patch api change by nathanleiby · Pull Request #5 · Clever/clever-python · GitHub
Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Put to patch api change#5

Merged
nathanleiby merged 5 commits into
masterfrom
put-to-patch-api-change
Jan 9, 2014
Merged

Put to patch api change#5
nathanleiby merged 5 commits into
masterfrom
put-to-patch-api-change

Conversation

@nathanleiby

Copy link
Copy Markdown
Contributor

All of the PUT endpoints in our API currently behave as PATCH endpoints. We're changing the method to actually be PATCH.

@ghost ghost assigned jonahkagan Jan 5, 2014
@nathanleiby

Copy link
Copy Markdown
Contributor Author

Comment thread clever/__init__.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this called get_method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This existed before my changes. But looks like it is a known practice with urllib2, despite the non-ideal interface that you're setting a value through something called get_method. See: http://stackoverflow.com/a/111988/950683 and http://stackoverflow.com/a/4511785/950683

@mohit

mohit commented Jan 6, 2014

Copy link
Copy Markdown
Contributor

tests?

Comment thread clever/__init__.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there still PUTs being used in this library?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more PUTs are in use. I'll remove 'put' since it's not a possible code path.

@nathanleiby

Copy link
Copy Markdown
Contributor Author

@m0hit regarding tests, afaik we cannot do updates calls against the API with api_key=DEMO_KEY. Would be good to find a workaround to enable this, so devs can see run test this feature on <endpoint>/{id}/properties.

@ghost ghost assigned mohit Jan 8, 2014
@mohit

mohit commented Jan 8, 2014

Copy link
Copy Markdown
Contributor

@nathanleiby you could just use a fake app that you created and share some demo data with it for the tests. Let's make this a code smell or something to come back to.

@nathanleiby

Copy link
Copy Markdown
Contributor Author

@m0hit added a code smell in JIRA

@nathanleiby

Copy link
Copy Markdown
Contributor Author

@m0hit I think this is good to merge - ok from your end?

@mohit

mohit commented Jan 9, 2014

Copy link
Copy Markdown
Contributor

👍—
Sent from Mailbox for iPhone

On Thu, Jan 9, 2014 at 11:37 AM, Nathan Leiby notifications@github.com
wrote:

@m0hit I think this is good to merge - ok from your end?

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

@azylman

azylman commented Jan 9, 2014

Copy link
Copy Markdown

Could also test put with something like nock. I'm sure there's a python equivalent (requests might even do it?)

@nathanleiby

Copy link
Copy Markdown
Contributor Author

@azylman - good point. I've updated the code smell and will return to this one later.

nathanleiby added a commit that referenced this pull request Jan 9, 2014
@nathanleiby nathanleiby merged commit 24f9857 into master Jan 9, 2014
@mohit

mohit commented Jan 9, 2014

Copy link
Copy Markdown
Contributor

It's called responses

@nathanleiby nathanleiby deleted the put-to-patch-api-change branch January 9, 2014 19:54
@azylman

azylman commented Jan 9, 2014

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants