Steem Platform Developer Documentation.
Clone or download
Permalink
Failed to load latest commit information.
_api removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
_apidefinitions Merge branch 'develop' into 340-debug-node-api_defs Oct 9, 2018
_community removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
_data bandwidth sunset #349 (#351) Oct 17, 2018
_glossary removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
_includes [#327] (#328) Sep 25, 2018
_introduction removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
_layouts fixed page description (also regenerated main offender tutorial) #277 ( Aug 1, 2018
_plugins 72 use neat json on api definitions (#114) Apr 12, 2018
_quickstart removed buildteam.io nodes Oct 7, 2018
_sass [#291] mark account_create_with_delegation & account_history_api.get_… Sep 12, 2018
_services clarifications for the general user #275 Aug 1, 2018
_steemjs Renaming python/javascript categories, inclusion of active link marke… Jan 31, 2017
_testnet removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
_tutorials-javascript 324 rake tutorials (#325) Sep 25, 2018
_tutorials-python 324 rake tutorials (#325) Sep 25, 2018
_tutorials-recipes bandwidth sunset #349 (#351) Oct 17, 2018
_tutorials-ruby 324 rake tutorials (#325) Sep 25, 2018
_tutorials fixed page description (also regenerated main offender tutorial) #277 ( Aug 1, 2018
css bandwidth sunset #349 (#351) Oct 17, 2018
images 153 redux (#213) Jun 12, 2018
js fix #78, adjust correctly and update js-tutorials (#128) Apr 24, 2018
lib/scrape [#318] add/update api defs, display tweak to api scraper (#322) Sep 25, 2018
unused removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
.gitignore removed .rb files and updated for related repo #221 (#222) Jun 13, 2018
CONTRIBUTING.md removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
Gemfile gem update #345 Oct 9, 2018
Gemfile.lock gem update #345 Oct 9, 2018
LICENSE Intial commit for new developer portal Jekyll/Skeleton, setting update Jan 10, 2017
Makefile added makefile Jan 19, 2017
Rakefile 226 rake scrape tutorials (#241) Jun 27, 2018
_config.yml deprecation: The 'gems' configuration option has been renamed to 'plu… Oct 9, 2018
apidefinitions.html 117 standardizing navigation pages for page nav (#123) Apr 26, 2018
apple-touch-icon.png Intial commit for new developer portal Jekyll/Skeleton, setting update Jan 10, 2017
community.html 117 standardizing navigation pages for page nav (#123) Apr 26, 2018
favicon.png Updates to layout, new fonts, improved readability, favicon Jan 23, 2017
index.html removed right-code (and doc-content, left-doc) #224 (#240) Jun 27, 2018
quickstart.html 117 standardizing navigation pages for page nav (#123) Apr 26, 2018
readme.md 226 rake scrape tutorials (#241) Jun 27, 2018
search.html Closes #285 (#310) Sep 14, 2018
services.html 117 standardizing navigation pages for page nav (#123) Apr 26, 2018
siteicon.png Intial commit for new developer portal Jekyll/Skeleton, setting update Jan 10, 2017
touch-icon.png Intial commit for new developer portal Jekyll/Skeleton, setting update Jan 10, 2017
tutorial_structure.md [#233] updated guidelines for image & ui (#238) Jun 21, 2018

readme.md

Steemit API Portal

Steemit API Portal

Steemit is the social media platform where everyone gets paid for creating and curating content.

The following API documents provide details on how to interact with the Steem blockchain database API which can get information on accounts, content, blocks and much more!

The developer portal will also serve as a toolbox for steem clients, libraries, and language wrappers.

Develop

Steemit Portal was built with Jekyll version 3.1.6, but should support newer versions as well.

Install the dependencies with Bundler:

$ bundle install

Run jekyll commands through Bundler to ensure you're using the right versions:

$ bundle exec jekyll serve

You can now test locally at

http://localhost:4000

Optionally, when running jekyll commands through Bundler, append --host x.x.x.x with the external IP address of the server to be able to connect remotely:

$ bundle exec jekyll serve --host x.x.x.x
http://x.x.x.x:4000

Rake Tasks

This application uses rake (Ruby's make command) to execute maintenance tasks. You can see the complete list of tasks by typing:

$ bundle exec rake -T

Production Deploy

When you're ready to deploy this application to production, make sure you have nothing to commit and your working tree is clean, then type:

$ bundle exec rake production:deploy

The above command will deploy the current site to gh-pages.

To reverse a previous bad deploy, use:

$ bundle exec rake production:rollback

Managing API Definitions

This application maintains a copy of API Definitions in _data/apidefinitions in YAML format. The purpose of these .yml files is to reflect details of each method.

In order to accurately synchronize the .yml files, we've added a rake task to evaluate the current state of the actual API, as reflected by the jsonrpc methods.

This command will check the current state of the API Definitions, report any differences, and write a new .yml file if these differences exist:

$ bundle exec rake scrape:api_defs

Typical output:

Definitions for: account_by_key_api, methods: 1
Definitions for: account_history_api, methods: 3
Definitions for: condenser_api, methods: 85
Definitions for: database_api, methods: 46
Definitions for: follow_api, methods: 10
Definitions for: jsonrpc, methods: 2
Definitions for: market_history_api, methods: 7
Definitions for: network_broadcast_api, methods: 3
Definitions for: tags_api, methods: 20
Definitions for: witness_api, methods: 2
Methods added or changed: 0

If you're interested in running the scrape against a different server, run the command like so:

$ TEST_NODE=<some server url> bundle exec rake scrape:api_defs

An example pointing at the steemitdev testnet:

$ TEST_NODE=https://testnet.steemitdev.com bundle exec rake scrape:api_defs

Importing

To import all new tutorials from all known tutorial repositories, which is the typical use case:

bundle exec rake scrape:tutorials

Targeted Import: devportal-tutorials-js

This command will check for new tutorials in devportal-tutorials-js and import them into this project.

bundle exec rake scrape:tutorials:js

To force update on a particular tutorial, use the following command:

bundle exec rake scrape:tutorials:js[1,true]

Where 1 represents the numerical prefix like in 01_blog_feed and true instructs the task to overwrite what's there, even if it exists.

Other Targeted imports supported are :py and :js using the same syntax.

Targeted Import: devportal-tutorials-py

bundle exec rake scrape:tutorials:py

Targeted Import: devportal-tutorials-rb

bundle exec rake scrape:tutorials:rb

Tests

To test all curl examples, use the following rake task:

$ bundle exec rake test:curl

Or, to test specific API namespaces, use:

$ bundle exec rake test:curl["follow_api witness_api"]

If you're interested in running this test against a different server, run the command like so

$ TEST_NODE=<some server url> bundle exec rake test:curl

An example pointing at the steemitdev testnet

$ TEST_NODE=https://testnet.steemitdev.com bundle exec rake test:curl