Class: DeviceV3Client
- Inherits:
-
Object
- Object
- DeviceV3Client
- Defined in:
- lib/mobpush/client/device/device_v3_client.rb
Class Attribute Summary collapse
-
.GET_BY_ALIAS ⇒ Object
Returns the value of attribute GET_BY_ALIAS.
-
.GET_BY_RID ⇒ Object
Returns the value of attribute GET_BY_RID.
-
.GET_DEVICE_DISTRIBUTION ⇒ Object
Returns the value of attribute GET_DEVICE_DISTRIBUTION.
-
.QUERY_BY_TAGS ⇒ Object
Returns the value of attribute QUERY_BY_TAGS.
-
.UPDATE_ALIAS ⇒ Object
Returns the value of attribute UPDATE_ALIAS.
-
.UPDATE_TAGS ⇒ Object
Returns the value of attribute UPDATE_TAGS.
Instance Method Summary collapse
- #getByRid(registrationId) ⇒ Object
- #getDeviceDistribution ⇒ Object
- #queryByAlias(_alias) ⇒ Object
- #queryByTags(tags) ⇒ Object
- #updateAlias(_alias, registrationId) ⇒ Object
- #updateTags(tags, registrationId, opType) ⇒ Object
Class Attribute Details
.GET_BY_ALIAS ⇒ Object
Returns the value of attribute GET_BY_ALIAS.
15 16 17 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15 def GET_BY_ALIAS @GET_BY_ALIAS end |
.GET_BY_RID ⇒ Object
Returns the value of attribute GET_BY_RID.
15 16 17 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15 def GET_BY_RID @GET_BY_RID end |
.GET_DEVICE_DISTRIBUTION ⇒ Object
Returns the value of attribute GET_DEVICE_DISTRIBUTION.
15 16 17 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15 def GET_DEVICE_DISTRIBUTION @GET_DEVICE_DISTRIBUTION end |
.QUERY_BY_TAGS ⇒ Object
Returns the value of attribute QUERY_BY_TAGS.
15 16 17 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15 def QUERY_BY_TAGS @QUERY_BY_TAGS end |
.UPDATE_ALIAS ⇒ Object
Returns the value of attribute UPDATE_ALIAS.
15 16 17 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15 def UPDATE_ALIAS @UPDATE_ALIAS end |
.UPDATE_TAGS ⇒ Object
Returns the value of attribute UPDATE_TAGS.
15 16 17 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 15 def UPDATE_TAGS @UPDATE_TAGS end |
Instance Method Details
#getByRid(registrationId) ⇒ Object
18 19 20 21 22 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 18 def getByRid(registrationId) params = {:registrationId => registrationId} url = MobPushConfig.baseUrl + DeviceV3Client.GET_BY_RID + registrationId MobHTTP.get(url, nil, params) end |
#getDeviceDistribution ⇒ Object
24 25 26 27 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 24 def getDeviceDistribution() url = MobPushConfig.baseUrl + DeviceV3Client.GET_DEVICE_DISTRIBUTION MobHTTP.get(url, nil, {}) end |
#queryByAlias(_alias) ⇒ Object
29 30 31 32 33 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 29 def queryByAlias(_alias) params = {:alias => _alias} url = MobPushConfig.baseUrl + DeviceV3Client.GET_BY_ALIAS + _alias MobHTTP.get(url, nil, params) end |
#queryByTags(tags) ⇒ Object
47 48 49 50 51 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 47 def queryByTags() params = {:tags => } url = MobPushConfig.baseUrl + DeviceV3Client.QUERY_BY_TAGS MobHTTP.post(url, nil, params) end |
#updateAlias(_alias, registrationId) ⇒ Object
35 36 37 38 39 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 35 def updateAlias(_alias, registrationId) params = {:alias => _alias, :registrationId => registrationId} url = MobPushConfig.baseUrl + DeviceV3Client.UPDATE_ALIAS MobHTTP.post(url, nil, params) end |
#updateTags(tags, registrationId, opType) ⇒ Object
41 42 43 44 45 |
# File 'lib/mobpush/client/device/device_v3_client.rb', line 41 def updateTags(, registrationId, opType) params = {:tags => , :registrationId => registrationId, :opType => opType} url = MobPushConfig.baseUrl + DeviceV3Client.UPDATE_TAGS MobHTTP.post(url, nil, params) end |