Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hive-js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hive-js
Commits
fdca8d25
Commit
fdca8d25
authored
8 years ago
by
adcpm
Browse files
Options
Downloads
Patches
Plain Diff
- Add Method Get Discussions By Feed
parent
06b63187
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/README.md
+6
-0
6 additions, 0 deletions
doc/README.md
lib/steem.js
+11
-0
11 additions, 0 deletions
lib/steem.js
package.json
+1
-1
1 addition, 1 deletion
package.json
test.js
+1
-1
1 addition, 1 deletion
test.js
with
19 additions
and
2 deletions
doc/README.md
+
6
−
0
View file @
fdca8d25
...
...
@@ -86,6 +86,12 @@ steem.getDiscussionsByHot(query, function(err, result) {
console
.
log
(
err
,
result
);
});
```
### Get Discussions By Feed
```
js
steem
.
getDiscussionsByFeed
(
query
,
function
(
err
,
result
)
{
console
.
log
(
err
,
result
);
});
```
## Blocks And Transactions
### Get Block Header
...
...
This diff is collapsed.
Click to expand it.
lib/steem.js
+
11
−
0
View file @
fdca8d25
...
...
@@ -221,6 +221,17 @@ Steem.prototype.getDiscussionsByHot = function(query, callback) {
});
};
/* get_discussions_by_feed */
Steem
.
prototype
.
getDiscussionsByFeed
=
function
(
query
,
callback
)
{
var
iterator
=
this
.
iterate
();
this
.
send
(
'
database_api
'
,
{
'
id
'
:
iterator
,
'
method
'
:
'
get_discussions_by_feed
'
,
'
params
'
:
[
query
]
},
function
(
err
,
data
)
{
if
(
iterator
==
data
.
id
)
callback
(
err
,
data
.
result
);
});
};
// Blocks and transactions
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
fdca8d25
{
"name"
:
"steem"
,
"version"
:
"0.2.1
3
"
,
"version"
:
"0.2.1
4
"
,
"description"
:
"SteemJS the JavaScript API for Steem blockchain"
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
This diff is collapsed.
Click to expand it.
test.js
+
1
−
1
View file @
fdca8d25
var
Steem
=
require
(
'
./lib/steem
'
),
steem
=
new
Steem
(
'
wss://steemit.com/ws
tmp3
'
);
steem
=
new
Steem
(
'
wss://steemit.com/ws
pa
'
);
steem
.
getAccounts
([
'
dan
'
,
'
ned
'
],
function
(
err
,
result
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment