Coder Social home page Coder Social logo

newsline's Introduction

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

  • search - string (mandatory) - subject of those pieces of news;
  • begindate - date (optional) default value = <today> - reference date point;
  • pagesize - int (optional) default value = 30, where int > 0. Number of pieces of news the answer will have;
  • pagenumber - int (optional) default value = 1, where int != 0. Number of pages ahead the answer will be;
  • firstpeceofnews - string (optional) - id of a piece of news;

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

  • search - string (mandatory) - subject of the timeseries;
  • startdate - date (optional) - start date of the time windows you want to cover;
  • enddate - date (optional) default value = <today> - end date of the time windows you want to cover;

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
    }
  ]
}

newsline's People

Contributors

as1511488 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.