Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the bundle files in create article. #19

Open
surinder-enest opened this issue Dec 29, 2017 · 1 comment
Open

What is the bundle files in create article. #19

surinder-enest opened this issue Dec 29, 2017 · 1 comment

Comments

@surinder-enest
Copy link

Here is the structure of how I'm using this

appleNewsObject = {"title":"dd","version":"1.5","language":"en","identifier":"dd","metadata":{"thumbnailURL":"ddd"},"layout":{"columns":"10","width":"1024","margin":"85","gutter":"20"},"components":[{"role":"heading1","text":"HEADING"},{"role":"title","text":"dd"},{"role":"intro"},{"role":"byline","text":"dddd"},{"role":"body","format":"html","text":"

Add some text here

"},{"role":"body","format":"html","text":"

Add some text here

"}]}

https://www.mydomain.com/test/article.json

My Json file has same data as "appleNewsObject"

var metadata = {}

client.createArticle({
channelId: accounts[index].channelId,
article: appleNewsObject,
bundleFiles: [
'https://www.mydomain.com/test/article.json',
metadata
],
}, (err, response) => {
if (err) {
console.log(err);
} else {
console.log(response);
}
});

This is giving me file type error for file "https://www.mydomain.com/test/article.json"

Please reply asap. I need the solution really urgent

@iefserge
Copy link
Contributor

@dharamEnest Hi! article.json file shouldn't be in the bundleFiles list. The actual article content (json as js object) should be provided in the article property.
See example https://github.com/micnews/apple-news/blob/master/live-test/live-api-test.js#L86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants