Skip to content

Commit

Permalink
fix several typos
Browse files Browse the repository at this point in the history
  • Loading branch information
davseby committed Mar 22, 2022
1 parent 4368cce commit f2e1390
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions newsapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewClient(apiKey string, opts ...ClientOption) *Client {
// Everything retrieves articles by the provided parameters.
// The uint return value indicates the number of available articles. The
// length of the returned slice may be less than this value; additional calls
// need to be make to retrieve other available articles.
// need to be made to retrieve other available articles.
// Endpoint documentation can be found here:
// https://newsapi.org/docs/endpoints/everything
func (c *Client) Everything(ctx context.Context, pr EverythingParams) ([]Article, uint, error) {
Expand All @@ -65,7 +65,7 @@ func (c *Client) Everything(ctx context.Context, pr EverythingParams) ([]Article
// TopHeadlines retrieves top headlines articles by the provided parameters.
// The uint return value indicates the number of available articles. The
// length of the returned slice may be less than this value; additional calls
// need to be make to retrieve other available articles.
// need to be made to retrieve other available articles.
// Endpoint documentation can be found here:
// https://newsapi.org/docs/endpoints/top-headlines
func (c *Client) TopHeadlines(ctx context.Context, pr TopHeadlinesParams) ([]Article, uint, error) {
Expand Down
6 changes: 3 additions & 3 deletions newsapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func Test_Client_Everything(t *testing.T) {
Message: "bad thing",
},
},
"Succesfully fetched articles": {
"Successfully fetched articles": {
Param: EverythingParams{
Query: "321",
},
Expand Down Expand Up @@ -250,7 +250,7 @@ func Test_Client_TopHeadlines(t *testing.T) {
Message: "bad thing",
},
},
"Succesfully fetched articles": {
"Successfully fetched articles": {
Param: TopHeadlinesParams{
Query: "321",
},
Expand Down Expand Up @@ -413,7 +413,7 @@ func Test_Client_Sources(t *testing.T) {
Message: "bad thing",
},
},
"Succesfully fetched sources": {
"Successfully fetched sources": {
Param: SourceParams{
Languages: []Language{
LanguageChinese,
Expand Down
4 changes: 2 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (sr *SourceParams) validate() error {
return nil
}

// rawQuery constructsa a raw query from parameters.
// rawQuery constructs a raw query from parameters.
func (sr *SourceParams) rawQuery() string {
q := make(url.Values)

Expand Down Expand Up @@ -492,7 +492,7 @@ type EverythingParams struct {
// * Words or phrases that must not appear in an article should be
// prefixed with a minus (-) sign. e.g -bitcoin.
// * "AND", "OR" and "NOT" keywords can be used to group several
// queries. Paranthesis can be used to create subgroups. e.g:
// queries. Parenthesis can be used to create subgroups. e.g:
// crypto AND (ethereum OR litecoin) NOT bitcoin.
// Query has a maximum length of 500 characters.
Query string
Expand Down

0 comments on commit f2e1390

Please sign in to comment.