Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[WIP] 12-SearchApi #36

Closed
wants to merge 6 commits into from
Closed

[WIP] 12-SearchApi #36

wants to merge 6 commits into from

Conversation

sukeshni
Copy link
Contributor

No description provided.

sukeshni added a commit that referenced this pull request May 21, 2015
@sukeshni
Copy link
Contributor Author

@shunjikonishi I think we will have to change the getter methods for Repository as well as User. I am not sure, please advice.
#43 (comment)

@shunjikonishi
Copy link
Contributor

@sukeshni
Please paste search response on Gist

@sukeshni
Copy link
Contributor Author

@shunjikonishi
Copy link
Contributor

See this.

https://github.com/code-check/github-api-scala/wiki/How-to-define-model

Maybe you can use trait.

@sukeshni
Copy link
Contributor Author

@shunjikonishi Thanks for the wiki-link
@fanwashere Please review.

}
}

case class searchCodeItems (value: JValue) extends AbstractJson(value){
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe the other fields (path, sha, url, git_url, html_url) will be useful too.

@fanwashere
Copy link
Contributor

@sukeshni fix me. I'm not sure if the query string implementation has to be changed, your implementation works; its just a matter of simplifying things. Also from Koni's comment:

$ git checkout master
$ git pull origin master
$ git checkout 3-issueAPI
$ git rebase master
(Maybe conflict happen, so you have to fix them with your editor.)
$ git rebase --continue
$ git push -f origin 3-issueAPI

To update to the latest changes.

@givery givery assigned sukeshni and unassigned fanwashere May 26, 2015
@givery givery added Fix me! and removed Review me! labels May 26, 2015
@sukeshni
Copy link
Contributor Author

@fanwashere Will update it with Master.
For Query String
Please see searchOpSpec, query string implementation/conversion in done.
Query will be checked on the client side and if something it wrong will be handled.
For ex.
User input query for searchRepositories will look like
q = "tetris language:assembly"
Here word "tetris" is searched in repositories having language set as "assembly".

@fanwashere
Copy link
Contributor

@sukeshni That is fine then. However, I think you should add in the other fields in searchCodeItems.

@sukeshni
Copy link
Contributor Author

@fanwashere I don't get the use of asserting (path, sha, url, git_url, html_url) for searchCodeItems. Please advice. Probably I should check for name, in SearchCode i am searching for language:js so i can check for filename with extension .js

@fanwashere
Copy link
Contributor

@sukeshni Sorry for not being clear. Currently in searchCodeItems there are two methods:

def name: String = get("name")
lazy val Repo = new Repository(value \ "repository")

I usually check for the contents of the response JSON object by writing showResponse(result) into the tests. When I did that, I found that it also gives you those other fields (path, sha, url, git_url, html_url). But without a method like:

def path: String = get("path")

We cannot access those fields. Some fields are redundant but I feel that these fields may be useful.

@ashawley ashawley mentioned this pull request Jan 20, 2017
13 tasks
ashawley pushed a commit to ashawley/github-api-scala that referenced this pull request Jan 20, 2017
@ashawley ashawley mentioned this pull request Jan 20, 2017
@ashawley
Copy link
Contributor

This PR can be closed in favor of #70, IMHO

ashawley pushed a commit to ashawley/github-api-scala that referenced this pull request Jan 23, 2017
ashawley pushed a commit to ashawley/github-api-scala that referenced this pull request Feb 7, 2017
@shunjikonishi shunjikonishi deleted the 12-SearchApi branch April 14, 2017 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants