+ wikipedia (en), small update to picplz #90

Merged
merged 3 commits into from Oct 16, 2011

Projects

None yet

2 participants

@arminrosu
Collaborator

Wikipedia (English only)

Added support for wikipedia contributions, english language only. Wikipedia Api Reference

By default 10 contributions are returned, but that number can be configured. Thinking of setting it to the lifestream count.

The API doesn't return a url for the contribution. It would be possible to get it, but that would require another API call, so I chose to simply replace spaces with underscores in the title, since this is the way wikipedia generates urls anyway (afaik).

The username used in the example has the highest number of edits on wikipedia.

Maybe should add a setting for the chosen language …

Picplz

Previously picplz streams were linking to the 640px wide image. Changed this to link to the picture page, so one could interact with the user as well.

arminrosu added some commits Oct 14, 2011
@arminrosu arminrosu picplz link to photo page, not image
Previously picplz streams were linking to the 640px wide image. Changed
this to link to the picture page, so one could interact with the user
as well.
bf4ce3b
@arminrosu arminrosu +wikipedia (English)
Added support for wikipedia contributions, english language only.
[Wikipedia Api Reference](http://www.mediawiki.org/wiki/API:Query)

By default 10 contributions are returned, but that number can be
configured. Thinking of setting it to the lifestream count.

The API doesn't return a url for the contribution. It would be possible
to get it, but that would require another API call, so I chose to
simply replace spaces with underscores in the title, since this is the
way wikipedia generates urls anyway (afaik).

The username used in the example has the highest number of edits on
wikipedia.

Maybe should add a setting for the chosen language …
7a2e847
@arminrosu arminrosu missed a comma :( 4eba4fe
@christianvuerings christianvuerings merged commit 4eba4fe into christianvuerings:master Oct 16, 2011

Hi Armin,

Thanks for your contribution.
Everything merged in nicely.

Collaborator

Excellent! What do you think about adding the language setting and using the lifestream count to set the number of contributions?

Sounds fine to me, so you have something like this in mind?

{
  service: 'wikipedia',
  user: 'Koavf',
  limit: 5,
  language: 'en'
}
Collaborator

Actually, only:

{
  service: 'wikipedia',
  user: 'Koavf',
  language: 'en'
}

The limit I can get from config._settings.count. I am just wondering how wise that would be, since it could mean a pretty large file ...

You're right, I would leave the limit/count out for now, as we do with other services.
Does that sound OK for you?

The language option is a nice feature though and should default to en if none is given.

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