TimPietrusky/codepen-awesomepi

Getting HTML, CSS and JS sources

Closed this issue · 3 comments

Hi, I'd like to know if there a way of getting the code of the pen using the API, I mean, for example
{
source: {
html: '

...',
css: 'body {}, .... and so on
}
}

Best regards

Hey CodeBuddy,

it's not possible yet, but this is going to be implemented with issue #5.

Can you please verify that #5 is what you want?

Cheers,
Tim

Hi tim,

Right, it's what you stated in issue #5.

We're working in a project and we'd also like to get the HTML, CSS, JS sources for a pen , in order to access them separately. This morning I was able to get the pen data sources, since there is a script in each pen which has some useful Pen info, like,

created_at: "2012-10-..."
css: " .. "
css_external: ""
css_pre_processor: "none"
css_prefix_free: true
css_starter: "neither"
description: " .. "
head: ""

We implemented this functionality our project, however it does not use this API, given this we'd like to know if we could help in the implementation of it within the API.

Looking forward on your thoughts

Best wishes,
Pablo

Fixed in issue #5.