nhk-easy-ruby

时间:2021-05-19 19:43:03
【文件属性】:
文件名称:nhk-easy-ruby
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-19 19:43:03
Ruby NHK :: Easy Ruby客户端库。 安装 将此行添加到您的应用程序的Gemfile : gem 'nhk-easy-ruby' 然后执行: $ bundle 或将其自己安装为: $ gem install nhk-easy-ruby 用法 为了获得NHK的最新消息,我们需要连接到他们的API。 我们使用NHK::Easy::Client类进行连接: client = NHK :: Easy :: Client . new 如果我们想要最新的新闻,可以使用news_list()方法: client . news_list 这将从NHK API返回NHK::Easy::NewsList实例。 TODO :为了从NHK获得特色文章,我们应该为top_news()实现类似的功能。 作为附带说明, Client使用以下基本uri发出所有请求: BASE_UR
【文件预览】:
nhk-easy-ruby-master
----tmp()
--------.git-keep(0B)
----lib()
--------nhk-easy-ruby.rb(3KB)
----Gemfile(67B)
----Rakefile(343B)
----test()
--------news_list_test.rb(398B)
--------parser_test.rb(198B)
--------helper.rb(247B)
--------client_test.rb(287B)
--------news_test.rb(2KB)
----nhk-easy-ruby.gemspec(625B)
----README.md(2KB)
----.gitignore(24B)

网友评论