Skip to content

mcspring/denglu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Denglu

denglu library provides access to Denglu, this is unofficial ruby implementation.

Installation

gem install denglu

Usage

Initialize the comment

require 'denglu'

# Setup global default configurations, see Denglu::Config for more info
Denglu::Config.app_id = 'your-app-id'
Denglu::Config.app_key = 'your-app-key'

or use object initialize params

require 'denglu'

comment = Denglu::Comment.new('your-app-id', 'your-app-key')
#=> #<Denglu::Comment:...>

List comments

comment.list
#=> [{"postid" => ..., "content" => ..., "mediaID" => ..., "createTime" => ..., "state" => ..., "commentID" => ..., "parentID" => ..., ...},
#    {...}]

Count comments

comment.total
#=> [{"id" => ..., "count" => ..., "url" => ...},
#    {...}]

See also

Copyright

Copyright (c) 2012 Spring MC. See LICENSE for details.

About

Denglu open API wrapper of ruby language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages