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

Adding API options to findById #60

Merged
merged 2 commits into from
Oct 13, 2017
Merged

Adding API options to findById #60

merged 2 commits into from
Oct 13, 2017

Conversation

kper
Copy link
Contributor

@kper kper commented Oct 10, 2017

The function findById did not return the same object like page. The API options must be the same for consistency.

Before:

{ raw: { pageid: 68187, ns: 0, title: 'FC Barcelona' },
  html: [Function: html],
  content: [Function: content],
  summary: [Function: summary],
  images: [Function: images],
  references: [Function: references],
  links: [Function: links],
  categories: [Function: categories],
  coordinates: [Function: coordinates],
  info: [Function: q],
  backlinks: [Function: backlinks],
  rawImages: [Function: h],
  mainImage: [Function: mainImage],
  langlinks: [Function: langlinks],
  rawInfo: [Function: p] }

After:

{ raw: 
   { pageid: 68187,
     ns: 0,
     title: 'FC Barcelona',
     contentmodel: 'wikitext',
     pagelanguage: 'en',
     pagelanguagehtmlcode: 'en',
     pagelanguagedir: 'ltr',
     touched: '2017-10-10T06:06:26Z',
     lastrevid: 803940480,
     length: 150109,
     fullurl: 'https://en.wikipedia.org/wiki/FC_Barcelona',
     editurl: 'https://en.wikipedia.org/w/index.php?title=FC_Barcelona&action=edit',
     canonicalurl: 'https://en.wikipedia.org/wiki/FC_Barcelona' },
  html: [Function: html],
  content: [Function: content],
  summary: [Function: summary],
  images: [Function: images],
  references: [Function: references],
  links: [Function: links],
  categories: [Function: categories],
  coordinates: [Function: coordinates],
  info: [Function: q],
  backlinks: [Function: backlinks],
  rawImages: [Function: h],
  mainImage: [Function: mainImage],
  langlinks: [Function: langlinks],
  rawInfo: [Function: p] }

@dijs
Copy link
Owner

dijs commented Oct 10, 2017

Good call. Can you fix the tests for this?

@kper
Copy link
Contributor Author

kper commented Oct 10, 2017

Test should handle Issue #55 failed

@kper
Copy link
Contributor Author

kper commented Oct 12, 2017

Can you rerun the CI job?

@dijs
Copy link
Owner

dijs commented Oct 13, 2017

Running again.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.153% when pulling d5ea1f3 on kper:master into 7003a9a on dijs:master.

@dijs dijs merged commit 444f65a into dijs:master Oct 13, 2017
@dijs
Copy link
Owner

dijs commented Oct 13, 2017

Published in v4.3.1

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.

3 participants