How to create list API

Attention please,here are 2 points you need to know about putting articles into API:

  1. Partners should put the articles into API immediately
    after publishing the articles in original website.Here please
    notice 2 points.Firstly,the order is to publish on original website
    and then put into API.Secondly,you should put the articles into
    API immediately once you publish articles in your original website.

  2. When the articles are updated on original website, partner should update these articles in API immediately
    and follow the latest update time to place the position of the articles.please do not place them
    in the previous position so that we can crawl them in time.

1. Customized page API examples:

English: http://img.ucweb.com/s/uae/g/1s/flow/api-customized-page-en.json?pageSize=20&pageNumber=1&partner=UC

API Information

HTTP Method GET
Response format JSON
URL Address The address needs to take version id
Description Data needs to be in a descending order of release time,but not in the order of ID or other arrangement method.

Note:
If the same article is updated, please follow the latest update time to place the position of the article,please do not place it in the previous location.

2. Request Parameters (Must have!)

Name Required Data Type Default Value Description
partner Y String ucbrowser
pageSize Y Number 20 numbers of stories per page
pageNumber Y Number 1 Current page number.When the feed displays the 1st page, pagenumber must equal to 1.

3. Response Data

name Parent Name Required Data Type Description
code Y Number Status code
error N String
data Y Object
size data Y Number number of stories
nextPage data N String Next page url, normally set pageNumber into 2
rows data Y Array
id rows[index] Y String News id, each story must have a unique id.
language rows[index] Y String The news language full name, such as "english", "hindi".
title rows[index] Y String Real news title, must be the same as title in customised page.
category rows[index] Y String UC Category list
subcategory rows[index] N String Single subcategory only
keywords rows[index] N String
description rows[index] N String Text in customised page.
tags rows[index] N Array The tags of news content
summary rows[index] N String Summary of the news
detailUrl rows[index] Y String Customised page URL of the story. DetailUrl must be a direct url, we don't allow 301, 302, 307 redirect.
articleFrom rows[index] N String Partners name.
originalUrl rows[index] Y String URL of the story on partners website
publishTime rows[index] Y String The latest time when the story is modified. Must be in 24-hour format.
createTime(discard) rows[index] Y String The time when the story is created.
coverPic rows[index] N Array[string] UC will use it as cover pics on list page
province rows[index] N String Province. For india: it should be state name.
city rows[index] N String City
itemChannel rows[index] Y String UC channel , eg: "Sports"
subitemChannel rows[index] N String UC subChannel , please provide as many as possible , next level channel also should be written in this field , split by ',' simbol . eg: "Cricket" or "Cricket,IPL,…"
pages rows[index] Y Array[Object] One or more content pages of a story. It can be empty array. Ex: page:[].
pageNumber pages[index] Y Number Current page number.
pageContent pages[index] Y String Current page content.
originalUrl pages[index] N String Current page url.

(1) code

  • Parent Name: none
  • Required: Y
  • Data Type: Number

Description:

Status code

(2) error

  • Parent Name: none
  • Required: N
  • Data Type: String

(3) data

  • Parent Name: none
  • Required: Y
  • Data Type: Object

(4) size

  • Parent Name: data
  • Required: Y
  • Data Type: Number

Description:

lines of news

(5) nextPage

  • Parent Name: data
  • Required: N
  • Data Type: String

Description:

nextPage means the parametre request the data on the coming page. In general, when you change the page number then it directs you to the coming pages. For example, current page is 2, the next page will be 3. According to the pagesize, this should be same as the request site. While the final page arrived, the parametre of next page will not return.

(6) rows

  • Parent Name: data
  • Required: Y
  • Data Type: Array

(7) id

  • Parent Name: data[index]
  • Required: Y
  • Data Type: String

Description:

News id, each story has a unique id.

(8) language

  • Parent Name: data[index]
  • Required: Y
  • Data Type: String

Description:

The news language full name such as "english","hindi".

(9) title

  • Parent Name: data[index]
  • Required: Y
  • Data Type: String

Description:

News title, must be in consistent with the title in customised page.

(10) category

  • Parent Name: data[index]
  • Required: Y
  • Data Type: String

Description:

  1. News category such as “sports”,”entertainment”etc.
  2. Single category only.

(11) subcategory

  • Parent Name: data[index]
  • Required: N
  • Data Type: String

Description:

Single subcategory only.

(12) keywords

  • Parent Name: data[index]
  • Required: N
  • Data Type: String

Description:
The keywords of the news

(13) description

  • Parent Name: data[index]
  • Required: N
  • Data Type: String

Description:
The description of the story

(14) tags

  • Parent Name: data[index]
  • Required: N
  • Data Type: Array

Description:

The tags of the story

(15) summary

  • Parent Name: data[index]
  • Required: N
  • Data Type: String

Description:

The summary of the story

Note:

  1. Please ensure the summary of api and original site are the same.

(16) detailUrl

  • Parent Name: data[index]
  • Required: Y
  • Data Type: String

Description:

  1. Customised page URL of the story.

Note:

  1. DetailUrl must be a direct url, we don't allow 301, 302, 307 redirect.

(17) articleForm

  • Parent Name: data[index]
  • Required: N
  • Data Type: String

Description:

Partners' name.

(18) originalUrl

  • Parent Name: data[index]
  • Required: N
  • Data Type: String

Description:

URL of the story on partners website

(19) publishTime

  • Parent Name: rows[index]
  • Required: Y
  • Data Type: String

Description:

The latest time when the story is modified. Must be in 24-hour format. For example:

2016-04-08 15:50:53 INT

(20) createTime(discard)

  • Parent Name: rows[index]
  • Required: Y
  • Data Type: String

Description:

The time when the story is created. Must be in 24-hour format. For example:

2016-04-08 15:50:53 INT

(21) coverPic

  • Parent Name: rows[index]
  • Required: N
  • Data Type: Array[String]

Description:

UC will use it as cover pics on list page. The picture must also shown in the customised page.

If customised page don't have any picture, just leave it blank.

\[One cover pic style\]

Three cover pic style

(22) province

  • Parent Name: rows[index]
  • Required: N
  • Data Type: String

(23) city

  • Parent Name: rows[index]
  • Required: N
  • Data Type: String

(24) itemChannel

  • Parent Name: rows[index]
  • Required: Y
  • Data Type: String

(25) subitemChannel

  • Parent Name: rows[index]
  • Required: N
  • Data Type: String

(26) pages

  • Parent Name: rows[index]
  • Required: N
  • Data Type: Array[Object]

Description:

(26) pageNumber

  • Parent Name: pages[index]
  • Required: Y
  • Data Type: Number

Description:

Mark the current page number.

(26) pageContent

  • Parent Name: pages[index]
  • Required: Y
  • Data Type: String

Description:

Include all the current page content.

Note:

  1. Please don't include the summary in the pageContent, and put it into the summary property.
  2. Please put the Picture description into the property of data-title inside <img>,please do not put it into a separate tag.

(26) originalUrl

  • Parent Name: pages[index]
  • Required: N
  • Data Type: String

Description:

Mark the URL address of current page.

results matching ""

    No results matching ""