YiiPowered API 1.0

Languages #

Depending on which language you want to get descriptions in you may choose to access API via either /en/api/1.0 for English or /ru/api/1.0 for Russian.

/projects #

Project object #

Each project contains the following fields:

  • id - ID of the project
  • title - name of the project
  • url - URL of the main project website
  • sourceUrl - URL of project source. Typically GitHub or BitBucket
  • isOpenSource - 1 if project is OpenSource. 0 if it is not.
  • isFeatured - 1 if project is featured. 0 if it is not.
  • yiiVersion - Yii framework version used. Either 1.1 or 2.0.
  • createdAt - UNIX timestamp indicating when project was added to YiiPowered.
  • updatedAt - UNIX timestamp indicating when project info was updated last time.
  • tags - an array of tags.
  • description - project description. Note that it may be in different language depending on which URL you are using for API calls. See Languages.
  • thumbnail - URL pointing to project thumbnail image.
  • users - users participated in the project.
  • votingResult - voting result for a project.

Particular project #

In order to get particular project, use the following request:

GET /projects/1

In the above 1 is the project ID.

Update project #

In order to update project, use the following request:

PUT /projects/1

In the above 1 is the project ID.

  • title - Name of the project.
  • url - URL of the main project website.
  • is_opensource - 1 if project is OpenSource. 0 if it is not.
  • source_url - URL of project source. Typically GitHub or BitBucket.
  • yii_version - Yii framework version used. Either 1.1 or 2.0.
  • description - Project description. Note that it may be in different language depending on which URL you are using for API calls. See Languages.
  • status - It can take the following values:
    • 0: deleted;
    • 10: draft;
    • 20: published.
  • primary_image_id - ID of the primary image.
  • tagValues - Tags of the project.

Delete project #

In order to delete project, use the following request:

DELETE /projects/1

In the above 1 is the project ID.

List #

In order to list projects use the following request:

GET /projects

Filtering list #

You may pass additional parameters when querying a list:

GET /projects?isOpenSource=1

  • tags - comma separated list of tags that should be used to tag a project in order for it to be returned.
  • title - a string that should be contained within project title.
  • url - a string that should be contained within project URL.
  • isOpenSource - 1 if only OpenSource projects should be returned. If the value is omitted or is 0, all projects are returned.
  • isFeatured - 1 if only Featured projects should be returned. If the value is omitted or is 0, all projects are returned.
  • yiiVersion - version of the framework project built with. Either 1.0 or 1.1.

Voting a project #

In order to vote a project, use the following request:

PUT /projects/1/vote

In the above 1 is the project ID.

  • value - -1 if thumbs down and 1 if thumbs up.

Return data:

  • votingResult - voting result for a project.

/users #

User object #

Each user object contains the following fields:

  • id - user ID
  • username - nickname
  • fullname - full name
  • github - GitHub
  • twitter - Twitter
  • facebook - Facebook

Particular user #

In order to get particular user, use the following request:

GET /users/1

In the above 1 is the user ID.

List #

In order to list users use the following request:

GET /users

/bookmarks #

Users are able to add or remove projects to bookmarks (favorites).

Bookmark object

  • createdAt - UNIX timestamp of when a project was bookmarked
  • project - expanded project object.

Current user bookmarks

In order to get current user bookmarks use the following request:

GET /bookmarks

Bookmark a project

In order to add a project to bookmarks use the following request:

POST /bookmarks

  • id: id of a project to bookmark

Remove a project from bookmarks

In order to remove a project from bookmarks issue the following request:

DELETE /bookmarks/91