Class: OnlineSim::GetProxy
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #changeip(tzid) ⇒ Object
- #changetype(tzid) ⇒ Object
- #get(cl: 'days', type: 'private', connect: 'https', count: 1, operator: nil, country: 7, city: 'any', port_count: 1, session: true) ⇒ Object
- #setcomment(tzid, comment: '') ⇒ Object
- #state(orderby: "ASC") ⇒ Object
- #stateone(tzid) ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from OnlineSim::Base
Instance Method Details
#changeip(tzid) ⇒ Object
17 18 19 |
# File 'lib/onlinesim/GetProxy.rb', line 17 def changeip(tzid) return self ._get(:endpoint => '/proxy/changeIp', :params => {tzid: tzid}) end |
#changetype(tzid) ⇒ Object
21 22 23 |
# File 'lib/onlinesim/GetProxy.rb', line 21 def changetype(tzid) return self ._get(:endpoint => '/proxy/changeType', :params => {tzid: tzid})['connect_type'] end |
#get(cl: 'days', type: 'private', connect: 'https', count: 1, operator: nil, country: 7, city: 'any', port_count: 1, session: true) ⇒ Object
5 6 7 |
# File 'lib/onlinesim/GetProxy.rb', line 5 def get(cl:'days', type:'private', connect:'https', count: 1, operator:nil, country: 7, city: 'any', port_count: 1, session:true ) return self ._get(:endpoint => '/proxy/getProxy', :params => {class: cl,type:type,connect:connect,count:count,operator:operator,country:country,city:city,port_count:port_count,session:session})['item'] end |
#setcomment(tzid, comment: '') ⇒ Object
25 26 27 |
# File 'lib/onlinesim/GetProxy.rb', line 25 def setcomment(tzid, comment: '') return self ._get(:endpoint => '/proxy/setComment', :params => {tzid: tzid,comment:comment}) end |
#state(orderby: "ASC") ⇒ Object
9 10 11 |
# File 'lib/onlinesim/GetProxy.rb', line 9 def state(orderby: "ASC") return self ._get(:endpoint => '/proxy/getState', :params => {orderby: orderby})['list'] end |
#stateone(tzid) ⇒ Object
13 14 15 |
# File 'lib/onlinesim/GetProxy.rb', line 13 def stateone(tzid) return self ._get(:endpoint => '/proxy/getState', :params => {tzid: tzid})['list'][0] end |