https://github.com/pine/crystal-qiita
:gem: A Crystal wrapper for the Qiita API
https://github.com/pine/crystal-qiita
Last synced: 12 months ago
JSON representation
:gem: A Crystal wrapper for the Qiita API
- Host: GitHub
- URL: https://github.com/pine/crystal-qiita
- Owner: pine
- License: mit
- Created: 2015-09-13T13:31:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-08T22:52:50.000Z (almost 10 years ago)
- Last Synced: 2025-01-13T03:13:58.159Z (about 1 year ago)
- Language: Crystal
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crystal-qiita
[](https://travis-ci.org/pine/crystal-qiita)
[](https://shards.rocks/github/pine/crystal-qiita)
[](https://shards.rocks/github/pine/crystal-qiita)
A [Crystal](http://crystal-lang.org/) wrapper for the [Qiita](http://qiita.com/) API.
## Installation
Add this line to your application's `shard.yml`:
```yaml
dependencies:
qiita:
github: pine/crystal-qiita
version: ~> 0.3.0
```
## Usage
See example example/search\_items.cr and [Official API reference](https://qiita.com/api/v2/docs).
```crystal
require "qiita"
res = Qiita.search_items({ query: "Crystal" })
res.each{|item| puts item.title }
```
## How to run example
First, you should install Crystal compiler, using a tool such as [crenv](https://github.com/pine/crenv).
```
$ git clone https://github.com/pine/crystal-qiita.git
$ cd ./crystal-qiita
$ crystal deps
$ crystal run ./example/search_items.cr
Keyword> Crystal
All Crystal 20 items found.
1: OpenShift で Crystal を動かす方法
Author: pine
URL : http://qiita.com/pine/items/6be6a266871f6b34c3f8
2: 文字の範囲・文字列の範囲
Author: kubo39
URL : http://qiita.com/kubo39/items/6cf405b1386601f83f1f
3: Crystal - Bool
Author: tbpgr
URL : http://qiita.com/tbpgr/items/8c54baacf5bd7a0ddbb2
...
```
## Contributing
1. Fork it ( https://github.com/pine/crystal-qiita/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## License
MIT License