trefoil

A crystal implementation of the 4chan REST API

trefoil

A crystal interface for the 4chan public REST API.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      trefoil:
        github: swarley/trefoil
    
  2. Run shards install

Usage

require "trefoil"

# Display all images in the first thread on /a/

client = Trefoil::Client.new

client.board("a").catalog.first.posts.each do |post|
  image = post.image
  puts image.url if image
end

Contributing

  1. Fork it (https://github.com/swarley/trefoil/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

Contributors

  • Matt - creator and maintainer
Repository

trefoil

Owner
Statistic
  • 0
  • 0
  • 3
  • 0
  • 1
  • over 6 years ago
  • March 3, 2019
License

MIT License

Links
Synced at

Thu, 26 Jun 2025 21:04:57 GMT

Languages