npm install nbcnews/anc-news-api#v1.0.3
import AppleNewsAPI from 'anc-news-api';
const API = AppleNewsAPI(channelID, APIKey, APISecret);
var AppleNewsAPI = require('anc-news-api');
var API = AppleNewsAPI(channelID, APIKey, APISecret);
- constructor(channelID, APIKey, APISecret)
channelID
(string)
APIKey
(string)
APISecret
(string)
- createArticle(article[, options = {}, optionsKey = 'ancOptions'])
article
(object)
options
(object, default: {}
)
optionsKey
(string, default: 'ancOptions'
)
- deleteArticle(articleID)
- listSections()
- readArticle(articleID)
- readChannel()
- readSection(sectionID)
- searchChannel(searchQuery)
searchQuery
(object, default: {}
)
- searchSection(sectionID, searchQuery)
sectionID
(string)
searchQuery
(object, default: {}
)
- updateArticle(articleID, revision[, article = {}, options = {}, optionsKey = 'ancOptions'])
articleID
(string)
revision
(string)
article
(object, default: {}
)
options
(object, default: {}
)
optionsKey
(string, default: 'ancOptions'
)