{"id":24057770,"url":"https://github.com/esno/lua-lsw","last_synced_at":"2025-02-26T12:46:16.728Z","repository":{"id":142321224,"uuid":"103855949","full_name":"esno/lua-lsw","owner":"esno","description":"an api client for leaseweb api","archived":false,"fork":false,"pushed_at":"2021-01-17T20:14:03.000Z","size":33,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T05:51:20.645Z","etag":null,"topics":["api","cli","command-line-tool","leaseweb","leaseweb-api","lua","lua-lsw"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-17T19:30:22.000Z","updated_at":"2023-02-13T19:13:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca96269e-618d-4764-a0f3-a0be96715bf7","html_url":"https://github.com/esno/lua-lsw","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esno%2Flua-lsw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esno%2Flua-lsw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esno%2Flua-lsw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esno%2Flua-lsw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esno","download_url":"https://codeload.github.com/esno/lua-lsw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240858573,"owners_count":19868998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cli","command-line-tool","leaseweb","leaseweb-api","lua","lua-lsw"],"created_at":"2025-01-09T05:50:53.235Z","updated_at":"2025-02-26T12:46:16.696Z","avatar_url":"https://github.com/esno.png","language":"Lua","readme":"# lua-lsw\n\na lua based client for [leaseweb api](http://developer.leaseweb.com/)\n\n## binding\n\n### install\n\n    % \u003e luarocks install lua-lsw\n\n### usage\n\n    % \u003e lua\n    Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio\n    \u003e\n    \u003e lswMetals = require('leaseweb.bareMetals')\n    \u003e metals = lswMetals:init('\u003capi-key\u003e').listServers()\n    \u003e\n    \u003e for k, v in pairs(metals[1]) do if type(v) == 'function' then print(k) end end\n    retrieveSwitchPortStatus\n    retrieveBareMetal\n    closeSwitchPort\n    updateIp\n    retrieveLease\n    retrieveBandwidthUsage\n    deleteLeases\n    retrievePowerStatus\n    retrieveDataTrafficUsage\n    listIps\n    updateBareMetal\n    listLeases\n    retrieveIp\n    openSwitchPort\n    reboot\n    deleteLease\n    retrieveInstallationStatus\n    retrieveNetworkUsage\n    createLease\n    retrievePassword\n\n## cli\n\n### install\n\n    % \u003e luarocks install lua-lswcli\n\n### usage\n\n#### authentication\n\nlsw cli is asking for the api key if config file doesn't exists.\nAs soon as you entered the api key it will persisted in `~/.config/lsw/rc.lua`\n\n    welcome to leaseweb api client. help for help\n    token \u003e 689990ad-ca3f-4d35-b299-0c493a86e985\n    \u003e :q\n\n#### common\n\n    % \u003e lsw\n    welcome to leaseweb api client. help for help\n    \u003e help\n    the following commands are available\n        bareMetal               manage your bare metal servers\n    \u003e bareMetal\n    bareMetal \u003e help\n    the following commands are available\n        info            prints detailed information about the selected server\n        ls              shows all bareMetal servers\n        ref             update server reference\n        select          select a server\n        status          prints information about server status\n    bareMetal \u003e ls\n    123456  ROFL001/Bare Metal      rofl1.example.org\n    234567  ROFL002/Bare Metal      rofl2.example.org\n    bareMetal \u003e status\n    no server selected\n    bareMetal \u003e select\n    1) ROFL001 / rofl1.example.org\n    2) ROFL002 / rofl2.example.org\n    select \u003e 1\n    bareMetal [ROFL001] \u003e status\n    power:  on              switch: open\n\n    a.b.c.d:                routed\n    b.c.d.e:                routed\n    c.d.e.f:                routed\n    ::1:                    routed\n    bareMetal [ROFL001] \u003e select \n    1) ROFL001 / rofl1.example.org\n    2) ROFL002 / rofl2.example.org\n    select \u003e 2\n    bareMetal [ROFL002] \u003e status\n    power:  on              switch: open\n\n    d.e.f.g:                routed\n    e.f.g.h:                routed\n    bareMetal [ROFL002] \u003e exit\n    \u003e exit\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesno%2Flua-lsw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesno%2Flua-lsw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesno%2Flua-lsw/lists"}