Sha256: 2c01530f58b3242f3ad38080928490a4b439567af3daa23b62113ecdbfdfb08a
Contents?: true
Size: 1005 Bytes
Versions: 5
Compression:
Stored size: 1005 Bytes
Contents
module Hsp class Marketplace DEFAULT_REST_URL = 'https://marketplace-server.hspconsortium.org'.freeze DEFAULT_WEBSOCKET_URL = 'wss://marketplace-server.hspconsortium.org/websocket'.freeze attr_accessor :rest_url attr_accessor :websocket_url def initialize(rest_url = DEFAULT_REST_URL, websocket_url = DEFAULT_WEBSOCKET_URL) self.rest_url = rest_url self.websocket_url = websocket_url end def services_url(id = nil) rest_url + '/services' + (id.nil? ? '' : "/#{id}") end def builds_url(service_id, build_id = nil) services_url(service_id) + '/builds' + (build_id.nil? ? '' : "/#{build_id}") end def users_url(id = nil) rest_url + '/users' + (id.nil? ? '' : "/#{id}") end def platforms_url(user_id, platform_id = nil) users_url(user_id) + '/platforms' + (platform_id.nil? ? '' : "/#{platform_id}") end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
hsp-0.1.4 | lib/hsp/marketplace.rb |
hsp-0.1.3 | lib/hsp/marketplace.rb |
hsp-0.1.2 | lib/hsp/marketplace.rb |
hsp-0.1.1 | lib/hsp/marketplace.rb |
hsp-0.1.0 | lib/hsp/marketplace.rb |