Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
A fast, simple, and easy-to-use e621/e926 client written in Crystal.
(also my first Crystal project)
shard.yml
:dependencies:
e6:
github: altlanta/e6.cr
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.
Client#list_posts
List postsClient#get_post
Get single postClient#list_flags
List flagsClient#list_tags
List tagsAdditionally, a CLI wrapper is in the works.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)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)