{% extends 'layout.html' %} {% block title %}Gistfy - Api{% endblock %} {% block og %} {% endblock %} {% block content %}

API

Gistfy a Gist from GitHub

<script type='text/javascript' src='http://www.gistfy.com/github/gist/:id'></script>
Parameters
Name Type Description
lang string Set programming language used for code highlighting. For example, lang=python. See supported languages here.
slice int Show only selected lines. For example, slice=1 show only line 1, slice=-1 show only the last line, slice=2: skip the first line, slice=:-2 skip the last line, slice=1:4 show lines 1 through 4, slice=-5:-1 show (last - 5) line through last line.
style string Set CSS color scheme. Can be github, monokai or monokai_sublime. Default: github. For example, style=monokai.
type string Set response type. Can be js or html. For example, type=js for JavaScript to be used with script tag and type=html for HTML to be used with AngularJS or jQuery.

Gistfy a file from Bitbucket or GitHub

<script type='text/javascript' src='http://www.gistfy.com/:host/:user/:repo/:path'></script>
Parameters
Name Type Description
branch string Set branch or changeset to be used. Default is master. For example, branch=0ff893db335695744dfed3d3e4be4eb4f9815534 to use a specific changeset.
lang string Set programming language used for code highlighting. For example, lang=python. See supported languages here.
slice int Show only selected lines. For example, slice=1 show only line 1, slice=-1 show only the last line, slice=2: skip the first line, slice=:-2 skip the last line, slice=1:4 show lines 1 through 4, slice=-5:-1 show (last - 5) line through last line.
style string Set CSS color scheme. Can be github, monokai or monokai_sublime. Default: github. For example, style=monokai.
type string Set response type. Can be js or html. For example, type=js for JavaScript to be used with script tag and type=html for HTML to be used with AngularJS or jQuery.
{% endblock %}