A fast, simple, and easy-to-use e621/e926 client written in Crystal.
(also my first Crystal project)
- Add the dependency to your
shard.yml
:
dependencies:
e6:
github: altlanta/e6.cr
- Run
shards install
An example of getting a single post.
require "e6"
e6c = Client.new
post = e6c.get_post(1011510)
if post
puts post.rating # => "s"
puts post.first_artist # => "huiro"
end
At the moment, only the most basic functionality is implemented. The e6 API is very convoluted, so implementing more of these might take some time.
- Create post
- Update post
-
Client#list_posts
List posts -
Client#get_post
Get single post -
Client#list_flags
List flags - Create flag
- Vote on post
- List favorites
- Create favorites
- Delete favorites
-
Client#list_tags
List tags - List tag aliases
- List notes
- Create notes
- Update notes
- Delete notes
- Revert notes
- List pools
- Create pools
- Update pools
- Revert pools
Additionally, a CLI wrapper is in the works.
- Fork it (https://github.com/altlanta/cr-e6client/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- altlanta - creator and maintainer
To clarify the name, "e6.cr" is the proper name of this lib. However, to prevent redundancy in file naming, the technical name is simply "e6". (since .cr
is the common file extension)