AYLIEN / aylien_newsapi_go

AYLIEN's officially supported Go client library for accessing News API
https://newsapi.aylien.com/
Other
5 stars 2 forks source link

cannot unmarshal array into Go struct field DeprecatedStory.stories.entities of type newsapi.DeprecatedEntities #12

Closed curlyotter closed 2 years ago

curlyotter commented 2 years ago

Hey! I am trying to test your API with the Go SDK. Unfortunately I run into the following error with a sample request from you: json: cannot unmarshal array into Go struct field DeprecatedStory.stories.entities of type newsapi.DeprecatedEntities If I am not mistaken, the struct DeprecatedStory has no property stories, but only the struct deprecatedStories. Can you please help me here so that I can test the API further? Many thanks in advance aylienRequest .

curlyotter commented 2 years ago

When I import v5, the script works. Maybe you can adjust the readme file for this and no longer link to v4 :)

FrontSide commented 2 years ago

Hey @curlyotter. Glad to hear you got it working. We offer both v4 and v5, respectively, which can be used depending on what plan the customer is on. You are right indeed, however, that the Readme should link to v5; we'll update that. Thanks : )

If you have any further questions please don't hesitate to reach out to customer.support@aylien.com with your APP ID.