NewsProviderHibernateImpl Resource

Service to get news information from our news Table

GET /news/getNewsArticleById/{id}

Get a news article by ID

Request Parameters
name type description constraints
id path long
Response Body
media type data type description
application/json NewsArticle (JSON) NewsArticle
application/xml newsArticle (XML)

Example

Request
GET /news/getNewsArticleById/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "title" : "...",
  "date" : 12345,
  "summary" : "...",
  "location" : "...",
  "cbt" : true,
  "andavo" : true,
  "content" : "...",
  "url" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /news/getRecentNewsArticles/{amount}

Get a specified amount of news articles

Request Parameters
name type description constraints
amount path int
Response Body
media type data type description
application/json array of NewsArticle (JSON) list of news articles
application/xml list of newsArticle (XML)

Example

Request
GET /news/getRecentNewsArticles/{amount}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "title" : "...",
  "date" : 12345,
  "summary" : "...",
  "location" : "...",
  "cbt" : true,
  "andavo" : true,
  "content" : "...",
  "url" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /news/getNewsArticlesAtIndex/{beginIndex}/{amount}

Get All

Request Parameters
name type description constraints
amount path int
beginIndex path int
Response Body
media type data type description
application/json array of NewsArticle (JSON) NewsArticle
application/xml list of newsArticle (XML)

Example

Request
GET /news/getNewsArticlesAtIndex/{beginIndex}/{amount}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "title" : "...",
  "date" : 12345,
  "summary" : "...",
  "location" : "...",
  "cbt" : true,
  "andavo" : true,
  "content" : "...",
  "url" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /news/getRecentNewsArticlesByCompany/{amount}/{cbt}/{andavo}

Get a specified amount of news articles restricted by company

Request Parameters
name type description constraints
amount path int
andavo path boolean
cbt path boolean
Response Body
media type data type description
application/json array of NewsArticle (JSON) list of news articles
application/xml list of newsArticle (XML)

Example

Request
GET /news/getRecentNewsArticlesByCompany/{amount}/{cbt}/{andavo}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "title" : "...",
  "date" : 12345,
  "summary" : "...",
  "location" : "...",
  "cbt" : true,
  "andavo" : true,
  "content" : "...",
  "url" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]