daragao / newsline

Newsline frontend app :)
0 stars 1 forks source link

End-point list:

List of Articles

Get a list of pieces of news about of a specific subject using HTTP GET.

http://api.geteon.com/piecesofnews

Parameters

Note: paremeters firstpeceofnews and begindate cannot coexist in the same request.

Callback output:

It returns the following JSON which contains an array and each element has the following fields: id, title of the piece of news, publish date, source id (RSS feed id), main source id, main source name (i.e. "The Guardian"), main source link, status of the piece of news according crawling process, link to the piece of news in the original source, and a number representing the .


[
  {
    "id":string
    "title":string,
    "pubdate":datetime,
    "idsource":int,
    "idmainsource":int,
    "mainsourcename":string,
    "mainsourcelink":"http:\/\/us.cnn.com\/?hpt=ed_US",
    "status":"NER",
    "link":"http:\/\/rss.cnn.com\/~r\/rss\/cnn_freevideo\/~3\/-WG5wFpDBAU\/",
    "counter":0
  }
]

Examples

http://api.geteon.com/piecesofnews?search=obama&pagesize=2&pagenumber=1&begindate=2014-01-30


[
   {
      "id":"52e9891fe4b00799c205c3ba",
      "title":"Sochi: US Athletes' Concerns",
      "pubdate":"2014-01-29 23:58:43",
      "idsource":1104,
      "idmainsource":"8",
      "mainsourcename":"CNN - US",
      "mainsourcelink":"http:\/\/us.cnn.com\/?hpt=ed_US",
      "status":"NER",
      "link":"http:\/\/rss.cnn.com\/~r\/rss\/cnn_freevideo\/~3\/-WG5wFpDBAU\/",
      "counter":0
   },
   {
      "id":"52e98911e4b00799c205c3b9",
      "title":"CNN tags along on a Lunar New Year trek",
      "pubdate":"2014-01-29 23:52:01",
      "idsource":1104,
      "idmainsource":"8",
      "mainsourcename":"CNN - US",
      "mainsourcelink":"http:\/\/us.cnn.com\/?hpt=ed_US",
      "status":"NER",
      "link":"http:\/\/rss.cnn.com\/~r\/rss\/cnn_freevideo\/~3\/uCJuW3r5nhw\/",
      "counter":1
   }
]

Possible Combinations

http://api.geteon.com/piecesofnews?search=obama

Returns a list with the most recent 30 pieces of news about obama. Default values: begindate = <today>, pagenumber = 1, pagesize = 30.

http://api.geteon.com/piecesofnews?search=obama&begindate=2013-11-02&pagenumber=25

Returns an ordered list with the previous 25 pieces of news about obama to 2013-11-02. Default values: pagenumber = 1.

http://api.geteon.com/piecesofnews?search=obama&firstpeceofnews=52ead626e4b0d73224446faf

Returns an ordered list with the previous 30 pieces of news about obama to the publish date of the piece of news with id=52ead626e4b0d73224446faf. Default values: pagenumber = 1, pagesize = 30.

http://api.geteon.com/piecesofnews?search=obama&firstpeceofnews=52ead626e4b0d73224446faf&pagenumber=-2&pagesize=10

Given an ordered list with the 20 pieces of news about obama ahead to the publish date of the piece of news with id=52ead626e4b0d73224446faf. It returns the last 10.

Time Series

Get a time series of a specific subject using HTTP GET.

End-point:

http://api.geteon.com/timeseries

Parameters

Note: the created time window with [<startdate> ; <endate>[ has maximum 30 days and the upper limit is not included.

Callback output:

It returns the following JSON which contains an array and each element has the following fields: date and an integer representing the number of pieces of news published in that date.


[
   {
      "date":date,
      "value":int
   }
]

Examples

http://api.geteon.com/timeseries?search=david%20miranda&startdate=2013-10-31&enddate=2013-11-03


[
   {
      "date":"2013-Oct-31",
      "value":"8"
   },
   {
      "date":"2013-Nov-01",
      "value":"3"
   },
   {
      "date":"2013-Nov-02",
      "value":"0"
   }
]

Possible Combinations

http://api.geteon.com/timeseries?search=obama

Returns the time series about obama with a 30 days time window [<today> - 30 days ; <today>[

http://api.geteon.com/timeseries?search=obama&enddate=2013-11-02

Returns the time series about obama with a 30 days time window [2013-10-31 ; 2013-11-02[

http://api.geteon.com/timeseries?search=obama&startdate=2013-10-31&enddate=2013-11-02

Returns the time series about obama with the time window [2013-10-31 ; 2013-11-02[.

Specific Article

Get the specified article using HTTP GET.

End-point:

http://api.geteon.com/piecesofnews/<ArticleID>

Callback output:

It returns the following JSON which contains the following fields: id, title, pubdate, idsource, idmainsource, mainsourcename, mainsourcelink, status, link, and piecenews.


{
  "id":string,
  "title":string,
  "pubdate":datetime,
  "idsource":int,
  "idmainsource":int,
  "mainsourcename":string,
  "mainsourcelink":string,
  "status":string,
  "link":string,
  "piecenews":string
}

Examples

http://api.geteon.com/piecesofnews/51bf87bfe4b03445c885fece


{
  "id":"51bf87bfe4b03445c885fece",
  "title":"GB success will continue - Clancy",
  "pubdate":"2012-04-17 15:35:09",
  "idsource":1031,
  "idmainsource":"5",
  "mainsourcename":"BBC",
  "mainsourcelink":"http:\/\/www.bbc.co.uk\/",
  "status":"NER",
  "link":"http:\/\/www.bbc.co.uk\/go\/rss\/-\/sport\/0\/cycling\/17743885",
  "piecenews":"Ed Clancy expects GB success to continue if Dave Brailsford..."
}

Sources

Get a list of the possible sources using HTTP GET.

End-point:

http://api.geteon.com/sources

Callback output:

It returns the following JSON which contains an array with which element has: id, name, and link of one source.


{
  [
    {
      "id":int,
      "name":string,
      "link":string
    }
  ]
}