YiiFeed API v1

Authentication

The ACCESS-TOKEN can be obtained in your personal account.

Access token (sent in a header)

curl -H "Authorization: Bearer ACCESS-TOKEN" https://yiifeed.com/api/v1

Access token (sent in query)

curl https://yiifeed.com/api/v1?access-token=ACCESS-TOKEN

Basic Authentication

curl -u "login:password" https://yiifeed.com/api/v1

Endpoints

Base URL is https://yiifeed.com/api/v1.

Current user profile #

In order to get current user profile, use the following request:

GET /profile

News

News object #

Each news contains the following fields:

  • id - ID.
  • title - Title.
  • text - Text.
  • link - Url to the source.
  • status - It can take the following values:
    • 1: proposed;
    • 2: published;
    • 3: rejected.
  • createdAt - UNIX timestamp indicating when news was created.
  • user - Creator as user object.
  • siteUrl - Url to news page on site.

Particular news #

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

GET /news/1

List #

In order to list news use the following request:

GET /news

Filtering list #

You may pass additional parameters when querying a list:

GET /news?userId=1

  • id - ID.
  • title - String that should be contained within news title.
  • text - String that should be contained within news text.
  • link - String that should be contained within url to source.
  • status - Status of a news as integer.
  • userId - ID creator of a news.

Users

User object #

Each user contains the following fields:

  • id - ID.
  • username - Username.
  • status - It can take the following values:
    • 0: deleted;
    • 10: active.
  • siteUrl - Url to user page on site.

Particular user #

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

GET /users/1

List #

In order to list user use the following request:

GET /users