Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
adgen for Crystal.
$ adgen config sample > .adgenrc
$ vi .adgenrc
[api]
email = "..."
password = "..."
[batch]
publisher_ids = [3]
$ adgen batch run today
shard.yml
:dependencies:
adgen:
github: maiha/adgen.cr
version: 0.4.2
shards install
require "adgen"
# generate token
client = Adgen::Client.new
token = client.authorize!("user.name@example.com", "password")
token.value # => "eyJ0..."
# call api
client = Adgen::Client.new(token: "xxxxxx") # "xxxxxx" is a token value
res = client.get("/api/v2/report/performances")
puts res.body
$ make test
$ make
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)