User Tools

Site Tools


manuals:vps:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
manuals:vps:api [2024/01/02 20:52] – Scopes aithermanuals:vps:api [2024/01/02 21:05] (current) – Split installation instructions aither
Line 83: Line 83:
 Scopes can contain globs for resource and action names. Action name is separated from resource name by a hash (''#''). Optional object IDs are separated from action name by a colon ('':'') and cannot contain globs. You can find a list of available scopes and their parameters in the [[https://api.vpsfree.cz/|documentation]]. Each token can have multiple scopes separated by spaces. At least one scope must match the called action in order for access to be granted. Scopes can contain globs for resource and action names. Action name is separated from resource name by a hash (''#''). Optional object IDs are separated from action name by a colon ('':'') and cannot contain globs. You can find a list of available scopes and their parameters in the [[https://api.vpsfree.cz/|documentation]]. Each token can have multiple scopes separated by spaces. At least one scope must match the called action in order for access to be granted.
  
-===== CLI =====+===== Installing vpsfree-client =====
 [[https://github.com/vpsfreecz/vpsfree-client|The Ruby client]] also includes a CLI. [[https://github.com/vpsfreecz/vpsfree-client|The Ruby client]] also includes a CLI.
-In order for it to work properly, you need Ruby >= 2.0 and Ruby header files+In order for it to work properly, you need Ruby >= 2.7, Ruby header files and ncurses (mostly packages with the ''-dev'' or ''-devel'' suffix).
-OpenSSL and ncurses (mostly packages with the ''-dev'' or ''-devel'' suffix) +
- +
-<note> +
-If you’re using OS X, you first need to install OpenSSL using [[http://brew.sh/|Homebrew]] and only then +
-can you install EventMachine (a gem required by the client). +
- +
-<code> +
-$ brew install openssl +
-$ sudo gem install eventmachine -- --with-opt-include="/usr/local/opt/openssl/" +
-</code> +
-</note> +
- +
-It can be installed using ruby gems: +
- +
-<code> +
-$ gem install vpsfree-client +
-</code> +
- +
-==== Installing in Windows 10 Using a Ubuntu Linux Subsystem ==== +
- +
-=== Installing Ubuntu (Windows 10 Subsystem for Linux) === +
- +
-  - in Windows 10, enable Developer Mode, let it install +
-  - in the Programs and Features menu, open Turn Windows Features On or Off, scroll to the very bottom, choose Windows Subsystem for Linux, run the installation and let the computer restart +
-  - after the restart, run bash in the Start menu as admin +
-  - create a Unix username and password +
-  - press the Y key and let the Ubuntu base be installed +
- +
-=== Installing Dependencies ===+
  
 <code bash> <code bash>
-sudo apt-get install ruby2.0 ruby2.0-dev libssl-dev make g+++gem install vpsfree-client
 </code> </code>
  
-=== A Quick & Dirty Fix to Set Ruby2.0 as Default Instead of 1.9 === +Platform-specific instructions:
- +
-<code bash> +
-sudo rm /usr/bin/ruby /usr/bin/gem /usr/bin/irb /usr/bin/rdoc /usr/bin/erb +
-sudo ln -s /usr/bin/ruby2.0 /usr/bin/ruby +
-sudo ln -s /usr/bin/gem2.0 /usr/bin/gem +
-sudo ln -s /usr/bin/irb2.0 /usr/bin/irb +
-sudo ln -s /usr/bin/rdoc2.0 /usr/bin/rdoc +
-sudo ln -s /usr/bin/erb2.0 /usr/bin/erb +
-sudo gem update --system +
-sudo gem pristine --all +
-</code> +
- +
-Sourcehttp://blog.costan.us/2014/04/restoring-ruby-20-on-ubuntu-1404.html +
- +
-=== Installing vpsfree-client === +
- +
-<code bash> +
-sudo gem install vpsfree-client +
-</code> +
- +
- +
-----+
  
 +  * [[manuals:vps:api:macos|macOS]]
 +  * [[manuals:vps:api:windows|Windows]]
  
-After the installation,  ''vpsfreectl'' should be available in ''$PATH''. If not,+After the installation, ''vpsfreectl'' should be available in ''$PATH''. If not,
 this can be fixed easily: this can be fixed easily:
  
Line 156: Line 107:
  
 <code> <code>
-$ PATH="$PATH:/home/user/.gem/ruby/2.0.0/bin"+$ PATH="$PATH:/home/user/.gem/ruby/3.0.0/bin"
 </code> </code>
  
-==== Usage ====+==== Using CLI ====
  
 <code> <code>
manuals/vps/api.txt · Last modified: 2024/01/02 21:05 by aither