changing paste read output for API refactoring
This commit is contained in:
@@ -88,6 +88,23 @@ class helper
|
||||
return $example;
|
||||
}
|
||||
|
||||
/**
|
||||
* get example paste
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getPasteAsJson($meta = array())
|
||||
{
|
||||
$example = self::getPaste();
|
||||
if (count($meta))
|
||||
$example['meta'] = $meta;
|
||||
$example['comments'] = array();
|
||||
$example['comment_count'] = 0;
|
||||
$example['comment_offset'] = 0;
|
||||
$example['@context'] = 'js/paste.jsonld';
|
||||
return json_encode($example);
|
||||
}
|
||||
|
||||
/**
|
||||
* get example paste ID
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user