Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

NotificationHubService ApnsService createOrUpdateTemplateRegistration documentation is missing 'tag' parameter #1599

Closed
justinschuldt opened this issue Jan 21, 2016 · 2 comments

Comments

@justinschuldt
Copy link

The documentation for the createOrUpdateTemplateRegistration is missing an input parameter for the tags associated with the registration. The documentation is here: http://azure.github.io/azure-sdk-for-node/azure-sb/latest/ApnsService.html#createOrUpdateTemplateRegistration

Code as described by documentation:

push.apns.createOrUpdateTemplateRegistration(registrationId, token, template, options, function(error, response){
   if(error){
    console.log('error: ', error);
  }
  console.log('response: ', response);
})

Result:

error: {
  "code": "400",
  "detail": "An invalid tag 'System.Collections.Generic.HashSet`1[System.String]' was supplied. Valid tag characters are alphanumeric, _, @, -, ., : and #.TrackingId:f88be04c-7edc-4b2e-a053-36a9e5d7de78_G1,TimeStamp:1/21/2016 6:36:08 PM",
  "statusCode": 400
}

Functional code:

push.apns.createOrUpdateTemplateRegistration(registrationId, token, null, template, options, function(error, response){
  if (error) {
    console.log('error: ', error);
  }
  console.log('response: ', response);
})

Result:

response:  { ETag: '1',
  ExpirationTime: '2016-04-20T18:44:12.984Z',
  RegistrationId: '317949338...05044766-10',
  DeviceToken: 'EC15BFD8655...079B37607D699F5E19B66F',
  BodyTemplate: '{"aps":{"alert":{"title":"$(title)","body":"$(message)"},"payload":{"messageId":"$(messageId)","messageDetailsBol":"$(messageDetailsBol)"}}}',
  Expiry: '',
  TemplateName: '',
  _: 
   { ContentRootElement: 'AppleTemplateRegistrationDescription',
     id: 'https://somehub-ns.servicebus.windows.net/somehub/registrations/317949338...9905044766-10?api-version=2013-07',
     title: '317949338154...05044766-10',
     published: '2016-01-21T18:44:13Z',
     updated: '2016-01-21T18:44:13Z',
     link: ''
  }
}

Not sure if this matters, but I am using https://github.com/Azure/azure-mobile-apps-node.

@azuresdkci azuresdkci changed the title NotificationHubService ApnsService createOrUpdateTemplateRegistration documentation is missing 'tag' parameter NotificationHubService ApnsService createOrUpdateTemplateRegistration documentation is missing 'tag' parameter Jan 22, 2016
@ankurkul
Copy link
Contributor

Thanks Justin for reporting the issue. We will fix the documentation soon.

@tony-gutierrez
Copy link

And now the documentation no longer exists. Awesome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants