User:Bagariavivek/Code/API Code

From mediawiki.org

ApiQueryWatchGroup(completed in the prototype)[edit]

This API will give the list of all the WatchGroups of the given user. This will extend ApiQueryGeneratorBase class.

Parameters[edit]

  1. limit - Number of results to be returned per request.
  2. owner - Name of the user whose WatchGroup you want to access.
  3. token - Token of the user's WatchGroup.
  4. start_timestamp - The time stamp to start enumerating from
  5. end_timestamp - The time stamp to end enumerating from
  6. props - Some extra properties
  • size - add no of pages of each Group
  • pref - add the preference number of each Group

ApiQueryParticularWatchGroup(completed in the prototype)[edit]

I have changed the name of the above API in the prototype to ApiQueryWatchPages

This API will give the list of all the pages in a particular WatchGroup of the user class. This will extend ApiQueryGeneratorBase class.

Parameters[edit]

  1. limit - Number of results to be returned per request.
  2. owner - Name of the user whose Group you want to access.
  3. edituser - Pages edited only by the given users.
  4. exclude_edituser - Skip pages edited only by the given users.
  5. token - Token of the user's WatchGroup.
  6. start_timestamp - The time stamp to start enumerating from.
  7. end_timestamp - The time stamp to end enumerating from.
  8. show - Show pages which meet only the given criteria, like non-bot edited, minor-edited etc.
  9. props - Extra properties for individual pages which can be added to the result.
  • user - User who edit the page.
  • title - Title of the page.
  • comment - Comment of the edit.
  • timestamp - Timestamp of the edit.
  • size - Size of the edit.
  • length - Length of the page.
  • url - Url of the page

ApiFeedWatchGroup[edit]

This API will give the list of all the groups of the user in RSS format. It will extend ApiBase class.

Parameters[edit]

  1. feedformat - Format of the feed.
  2. owner - Name of the user whose Group you want to access.
  3. token - Token of the user's WatchGroup.
  4. excludeuser - Skip pages edited only by the given users.
  5. hours - Pages modified from X hours from now.
  6. props - Extra properties for individual pages which can be added to the result.
  • user - User who edit the page.
  • title - Title of the page.
  • comment - Comment of the edit.
  • timestamp - Timestamp of the edit.
  • size - Size of the edit.
  • length - Length of the page.

ApiShiftWatchGroupPages[edit]

This API will shift pages between to groups of the user.This will extend ApiBase class. This is mainly for a automated bot.

Parameters[edit]

  1. owner - Name of the user whose Group you want to access.
  2. token - Token of the user's WatchGroup.
  3. groupname1 - Name of the page's Group.
  4. groupname2 - Name of the Group to which the page will be added.
  5. comment - Reason for shift.
  6. retain(bool)- Retain the page in original group?

ApiListDeletedPagesWatchGroup[edit]

This will list out all the deleted pages from the WatchGroup. This will extend ApiQuery class.

Parameters[edit]

  1. limit - Number of results to be returned per request.
  2. owner - Name of the user whose WatchGroup you want to access.
  3. token - Token of the user's WatchGroup.
  4. url - Url to re-add the deleted page to WatchGroup.


ApiCreationDetailsWatchGroup[edit]

This API will give the list of details of WatchGroups of the given user. This will extend ApiQueryBase class.

Parameters[edit]

  1. limit - Number of results(groups) to be returned per request.
  2. owner - Name of the user whose WatchGroup you want to access.
  3. token - Token of the user's WatchGroup.

These are the parameters i could think as of now. Suggestions are always welcome :-)