Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

updown.io API helper

License

NotificationsYou must be signed in to change notification settings

anamba/updown.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VersionLicense

Seeupdown.io API Docs for more information on available endpoints and parameters.

Status: Works, but error handling is pretty rough (API documentation is a little sparse in this area, so it needs more real-world testing). Please open issues for anything you that could be improved.

Installation

  1. Add the dependency to yourshard.yml:

    dependencies:updown:github:anamba/updown.cr
  2. Runshards install

Usage

Configure API key either by setting UPDOWN_API_KEY in your environment orUpdown.settings.api_key = "your key here".

require"updown"# create a new checkcheck=Updown::Check.new("https://updown.io")check.save# list all existing checkschecks=Updown::Check.allcheck= checks.last.get# re-fetch with metrics# find a single check - to find token, either use `Updown::Check.all`# or look at check page url (https://updown.io/[token])check=Updown::Check.get("token")# returns nil if token doesn't exist (or wrong API key)# change attributes and savecheck.period# 300check.period=60# 60check.save# true (or Updown::Error)

All methods that call the Updown API raiseUpdown::Error on a non-200 response code.

Contributing

  1. Fork it (https://github.com/anamba/updown.cr/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


[8]ページ先頭

©2009-2025 Movatter.jp