Skip to content

defined get_item and used in some calls#12

Open
espinielli wants to merge 1 commit intopoplav:masterfrom
espinielli:master
Open

defined get_item and used in some calls#12
espinielli wants to merge 1 commit intopoplav:masterfrom
espinielli:master

Conversation

@espinielli
Copy link

fixes #1
(at least it is a start ;-)

@espinielli
Copy link
Author

espinielli commented Oct 27, 2018

Good inspirations for API wrappers are to be found in hbrmstr repos, see for example https://github.com/hrbrmstr/darksky

} else {
query <- ""
}
url <- paste0("https://hacker-news.firebaseio.com/v0/item/", id, ".json", query)
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
url <- paste0("https://hacker-news.firebaseio.com/v0/item/", id, ".json", query)
url <- paste0(base_url, "/item/", id, ".json", query)

Copy link
Owner

Choose a reason for hiding this comment

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

Wanted to use the constant here rather than hard code

@poplav
Copy link
Owner

poplav commented Oct 29, 2018

Thanks for the contribution, btw

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor out getItem

2 participants