Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds the search code API #32

Merged
merged 4 commits into from
Jan 16, 2016
Merged

Adds the search code API #32

merged 4 commits into from
Jan 16, 2016

Conversation

zamith
Copy link
Contributor

@zamith zamith commented Jun 28, 2015

The sort and order parameters are optional, so there is one function
that takes those arguments and one that doesn't.

zamith added 3 commits June 28, 2015 21:46
The sort and order parameters are optional, so there is one function
that takes those arguments and one that doesn't.
In order to able to use GitHub's querying language on the URL, it must
be possible not to URL encode it.
@@ -56,9 +56,9 @@ defmodule Tentacat do
_request(:put, url(client, path), client.auth, body)
end

def get(path, client, params \\ []) do
def get(path, client, params \\ [], encode \\ true) do
Copy link
Owner

Choose a reason for hiding this comment

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

Can we make this an option as a keyword list?

Something like

def get(path, client, params \\ [], options \\ [])

Keyword.get(options, :encode, true)

It would be clearer than just passing true/false

@edgurgel
Copy link
Owner

I'm sorry for the massive delay!

@zamith
Copy link
Contributor Author

zamith commented Sep 16, 2015

Apparently GitHub API has changed, so I updated the examples, and now I don't remember why I needed the non encoded url, so I just removed that code. I can put it back in if you want.

@duksis
Copy link
Collaborator

duksis commented Jan 16, 2016

works on my machine :) and looks good to me - thanks! @zamith

duksis added a commit that referenced this pull request Jan 16, 2016
Adds the search code API
@duksis duksis merged commit 877965d into edgurgel:master Jan 16, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants