ex_golos v0.10.0 Golos.SocialNetworkApi
Contains all functions to call Golos database_api methods
Link to this section Summary
Functions
Get all account votes
Get active votes on the given content. Accepts author and permlink
Get active witnesses
Get categories. Accepts wanted metric, after_category, limit. Example result:
%{
"accounts" => ...,
"categories" => ...,
"category_idx" => ...,
"discussion_idx" => ...,
"error" => ...,
"feed_price" => ...,
"pow_queue" => ...,
"props" => ...,
"witness_schedule" => ...,
"current_virtual_time" => ...,
"id" => ...,
"majority_version" => ...,
"median_props" => ...,
"next_shuffle_block_num" => ...,
"witnesses" => ... }
Returns content data, accepts author and permlink
Returns a list of replies to the given content, accepts author and permlink
Gets current GBG to GOLOS conversion requests for given account. Example result:
[%{"amount" => "100.000 GBG", "conversion_date" => "2017-02-17T18:59:42",
"id" => "2.15.696", "owner" => "ontofractal", "requestid" => 1486753166}]
Get discussions by the wanted metric. Accepts a metric atom and a map with a following query params: %{tag: String.t
, limit: integer
}
ContentResult has the same shape as a result returned by get_content.
Example result:
[ContentResult, ContentResult, ...]
If start_permlink is empty then only before_date will be considered. If both are specified the earlier of the two metrics will be used.
before_date format is: 2017-02-07T14:34:11
Example response:
ContentResult has the same shape as a result returned by get_content.
Example result:
[ContentResult, ContentResult, …]
Get miner queue
Returns past owner authorities that are valid for account recovery. Doesn’t seem to work at this moment.
Get state for the provided path. Example result:
%{
"accounts" => ...,
"categories" => ...,
"category_idx" => ...,
"content" => ...,
"current_route" => ...,
"discussion_idx" => ...,
"error" => ...,
"feed_price" => ...,
"pow_queue" => ...,
"props" => ...,
"witness_schedule" => ...,
"witnesses" => ... }
Get trending tags
Get witness count
Get witnesses by votes. Example response is the same as get_witnesses
Lookup witness accounts
Link to this section Functions
Get all account votes
Example response:
[%{"authorperm" => "rusldv/programmiruem-na-php-vvedenie", "percent" => 10000,
"rshares" => 130036223, "time" => "2017-01-26T20:06:03", "weight" => 0},
%{...}, ...] ```
Get active votes on the given content. Accepts author and permlink.
Example response:
[%{"percent" => 6900, "reputation" => "28759071217014",
"rshares" => "18897453242648", "time" => "2017-01-27T09:20:21",
"voter" => "hipster", "weight" => "51460692508758354"},
%{...}, ...] ```
Get active witnesses
Example response:
["primus", "litvintech", "yaski", "serejandmyself", "dark.sun", "phenom",
"hipster", "gtx-1080-sc-0048", "lehard", "aleksandraz", "dr2073", "smailer",
"on0tole", "roelandp", "arcange", "testz", "vitaly-lvov", "xtar", "anyx",
"kuna", "creator"]
Get categories. Accepts wanted metric, after_category, limit. Example result:
%{
"accounts" => ...,
"categories" => ...,
"category_idx" => ...,
"discussion_idx" => ...,
"error" => ...,
"feed_price" => ...,
"pow_queue" => ...,
"props" => ...,
"witness_schedule" => ...,
"current_virtual_time" => ...,
"id" => ...,
"majority_version" => ...,
"median_props" => ...,
"next_shuffle_block_num" => ...,
"witnesses" => ... }
Returns content data, accepts author and permlink.
Example response:
%{"max_accepted_payout" => "1000000.000 GBG",
"title" => "[объявление] Краудсейл и Шэрдроп. Дистрибьюция",
"category" => "ru--kraudseijl", "promoted" => "0.000 GBG",
"last_update" => "2016-12-06T15:36:54", "created" => "2016-12-05T16:43:03",
"parent_permlink" => "ru--kraudseijl", "total_vote_weight" => 0,
"json_metadata" => "{"tags":["ru--kraudseijl","ru--shyerdrop","ru--golos"],"users":["golos","crowdsale","cyberdrop","misha","ether","bender","hipster","litvintech","vitaly-lvov"],"image":["https://dl.dropboxusercontent.com/u/52209381/golos/golos.png","https://dl.dropboxusercontent.com/u/52209381/golos/Screenshot%202016-12-05%2018.30.00.png","https://dl.dropboxusercontent.com/u/52209381/golos/ico_final-min.jpg","https://dl.dropboxusercontent.com/u/52209381/golos/Screenshot%202016-12-06%2002.25.05.png","https://dl.dropboxusercontent.com/u/52209381/golos/card.png"],"links":["https://docs.google.com/spreadsheets/d/1JwCAeRwsu4NzCG20UDM_CnEEsskl0wtvQ7VYjqi233A/edit?usp=sharing","https://golos.io/@litvintech"]}",
"last_payout" => "2017-01-15T11:00:06",
"total_payout_value" => "2412.784 GBG", "allow_replies" => true,
"children_rshares2" => "0", "id" => "2.8.30160",
"pending_payout_value" => "0.000 GBG", "children" => 15, "replies" => [],
"body" => "...",
"active" => "2016-12-06T22:23:06", "net_rshares" => 0,
"author_rewards" => 10011558, "total_pending_payout_value" => "0.000 GBG",
"root_comment" => "2.8.30160", "max_cashout_time" => "1969-12-31T23:59:59",
"root_title" => "[объявление] Краудсейл и Шэрдроп. Дистрибьюция",
"allow_votes" => true, "percent_steem_dollars" => 10000,
"children_abs_rshares" => 0, "net_votes" => 90, "author" => "litvintech",
"curator_payout_value" => "112.100 GBG",
"permlink" => "obyavlenie-kraudseil-i-sherdrop-distribyuciya",
"url" => "/ru--kraudseijl/@litvintech/obyavlenie-kraudseil-i-sherdrop-distribyuciya",
"cashout_time" => "2017-02-14T11:00:06", "parent_author" => "",
"allow_curation_rewards" => true, "vote_rshares" => 0,
"reward_weight" => 10000,
"active_votes" => [%{"percent" => 1000, "reputation" => "15928643268388",
"rshares" => "1974529666496", "time" => "2016-12-05T17:02:39",
"voter" => "val", "weight" => "99631990926249375"}, %{...}, ...], "depth" => 0,
"mode" => "second_payout", "abs_rshares" => 0,
"author_reputation" => "22784203010137"}
Returns a list of replies to the given content, accepts author and permlink.
Example response:
[%{"max_accepted_payout" => "1000000.000 GBG", "title" => "",
"category" => "ru--kraudseijl", "promoted" => "0.000 GBG",
"last_update" => "2016-12-05T16:50:09",
"created" => "2016-12-05T16:50:09",
"parent_permlink" => "obyavlenie-kraudseil-i-sherdrop-distribyuciya",
"total_vote_weight" => 0,
"json_metadata" => "{"tags":["ru--kraudseijl"]}",
"last_payout" => "2017-01-15T11:00:06",
"total_payout_value" => "12.892 GBG", "allow_replies" => true,
"children_rshares2" => "0", "id" => "2.8.30165",
"pending_payout_value" => "0.000 GBG", "children" => 1,
"replies" => [],
"body" => "И он сказал поехали...",
"active" => "2016-12-06T01:57:24", "net_rshares" => 0,
"author_rewards" => 53499,
"total_pending_payout_value" => "0.000 GBG",
"root_comment" => "2.8.30160",
"max_cashout_time" => "1969-12-31T23:59:59",
"root_title" => "[объявление] Краудсейл и Шэрдроп. Дистрибьюция",
"allow_votes" => true, "percent_steem_dollars" => 10000,
"children_abs_rshares" => 0, "net_votes" => 6,
"author" => "dmilash", "curator_payout_value" => "4.296 GBG",
"permlink" => "re-litvintech-obyavlenie-kraudseil-i-sherdrop-distribyuciya-20161205t165002890z",
"url" => "/ru--kraudseijl/@litvintech/obyavlenie-kraudseil-i-sherdrop-distribyuciya#@dmilash/re-litvintech-obyavlenie-kraudseil-i-sherdrop-distribyuciya-20161205t165002890z",
"cashout_time" => "1969-12-31T23:59:59",
"parent_author" => "litvintech",
"allow_curation_rewards" => true, "vote_rshares" => 0,
"reward_weight" => 10000, "active_votes" => [], "depth" => 1,
"mode" => "second_payout", "abs_rshares" => 0,
"author_reputation" => "37110534901202"},
%{...},
...]
Gets current GBG to GOLOS conversion requests for given account. Example result:
[%{"amount" => "100.000 GBG", "conversion_date" => "2017-02-17T18:59:42",
"id" => "2.15.696", "owner" => "ontofractal", "requestid" => 1486753166}]
Get discussions by the wanted metric. Accepts a metric atom and a map with a following query params: %{tag: String.t
, limit: integer
}
ContentResult has the same shape as a result returned by get_content.
Example result:
[ContentResult, ContentResult, ...]
If start_permlink is empty then only before_date will be considered. If both are specified the earlier of the two metrics will be used.
before_date format is: 2017-02-07T14:34:11
Example response:
ContentResult has the same shape as a result returned by get_content.
Example result:
[ContentResult, ContentResult, …]
Get miner queue
Example response:
["gtx-1080-sc-0083", "gtx-1080-sc-0016", "gtx-1080-sc-0084", "gtx-1080-sc-0017",
"gtx-1080-sc-0085", "gtx-1080-sc-0018", "penguin-11", "gtx-1080-sc-0028",
"gtx-1080-sc-0023", "gtx-1080-sc-0080", ...]
Returns past owner authorities that are valid for account recovery. Doesn’t seem to work at this moment.
Get state for the provided path. Example result:
%{
"accounts" => ...,
"categories" => ...,
"category_idx" => ...,
"content" => ...,
"current_route" => ...,
"discussion_idx" => ...,
"error" => ...,
"feed_price" => ...,
"pow_queue" => ...,
"props" => ...,
"witness_schedule" => ...,
"witnesses" => ... }
Get trending tags
Example result:
[
%{"comments" => 386, "id" => "5.4.29", "net_votes" => 16361,
"tag" => "golos", "top_posts" => 448,
"total_children_rshares2" => "263770002351940021381162037540",
"total_payout" => "1210679.260 GBG"},
%{"comments" => 0, "id" => "5.4.6338", "net_votes" => 59,
"tag" => "golos-io", "top_posts" => 1,
"total_children_rshares2" => "7597368466598778563409",
"total_payout" => "1533.724 GBG"},
%{"comments" => 1, "id" => "5.4.741", "net_votes" => 39,
"tag" => "golos-soft", "top_posts" => 2,
"total_children_rshares2" => "87745768291122276983586401",
"total_payout" => "12.812 GBG"},
...]
Get witness count
Example response: 997
Get witnesses by votes. Example response is the same as get_witnesses.
Lookup witness accounts
Example response:
["creator", "creatorgalaxy", "crypto", "cryptocat", "cyberfounder", "cybertech-01", "d00m", "dacom", "dance", "danet"]