Merge pull request #7 from Microsoft/0.4

0.4 client
This commit is contained in:
Sharad Agarwal 2016-06-10 17:53:29 -07:00 коммит произвёл GitHub
Родитель 6c891ce591 ff7ed98294
Коммит 3c0c08b593
85 изменённых файлов: 2253 добавлений и 861 удалений

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -19,6 +19,8 @@ var models = require('./index');
*
* @member {date} createdTime Gets or sets created time
*
* @member {date} lastUpdatedTime Gets or sets last updated time
*
* @member {object} user Gets or sets owner of the comment
*
* @member {string} [user.userHandle] Gets or sets user handle
@ -57,7 +59,7 @@ var models = require('./index');
* querying user has liked the comment
*
* @member {string} [contentStatus] Gets or sets content status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
*/
function CommentView() {
@ -98,6 +100,13 @@ CommentView.prototype.mapper = function () {
name: 'DateTime'
}
},
lastUpdatedTime: {
required: true,
serializedName: 'lastUpdatedTime',
type: {
name: 'DateTime'
}
},
user: {
required: true,
serializedName: 'user',
@ -168,7 +177,7 @@ CommentView.prototype.mapper = function () {
serializedName: 'contentStatus',
type: {
name: 'Enum',
allowedValues: [ 'Active', 'Banned' ]
allowedValues: [ 'Active', 'Banned', 'Mature', 'Clean' ]
}
}
}

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

92
models/index.d.ts поставляемый
Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
@ -56,6 +56,8 @@ export interface BuildsCurrentResponse {
*
* @member {date} createdTime Gets or sets created time
*
* @member {date} lastUpdatedTime Gets or sets last updated time
*
* @member {object} user Gets or sets owner of the comment
*
* @member {string} [user.userHandle] Gets or sets user handle
@ -94,13 +96,14 @@ export interface BuildsCurrentResponse {
* querying user has liked the comment
*
* @member {string} [contentStatus] Gets or sets content status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
*/
export interface CommentView {
commentHandle: string;
topicHandle: string;
createdTime: Date;
lastUpdatedTime: Date;
user: UserCompactView;
text: string;
blobType?: string;
@ -459,7 +462,7 @@ export interface FeedResponseTopicView {
* @member {string} publisherType Gets or sets publisher type. Possible values
* include: 'User', 'App'
*
* @member {object} user Gets or sets owner of the topic
* @member {object} [user] Gets or sets owner of the topic
*
* @member {string} [user.userHandle] Gets or sets user handle
*
@ -510,7 +513,7 @@ export interface FeedResponseTopicView {
* querying user has pinned the topic
*
* @member {string} [contentStatus] Gets or sets content status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
* @member {object} [app] Gets or sets the containing app
*
@ -535,7 +538,7 @@ export interface TopicView {
createdTime: Date;
lastUpdatedTime: Date;
publisherType: string;
user: UserCompactView;
user?: UserCompactView;
title?: string;
text: string;
blobType?: string;
@ -584,6 +587,8 @@ export interface PutPushRegistrationRequest {
*
* @member {date} createdTime Gets or sets created time
*
* @member {date} lastUpdatedTime Gets or sets last updated time
*
* @member {object} user Gets or sets owner of the reply
*
* @member {string} [user.userHandle] Gets or sets user handle
@ -613,7 +618,7 @@ export interface PutPushRegistrationRequest {
* querying user has liked the reply
*
* @member {string} [contentStatus] Gets or sets content status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
*/
export interface ReplyView {
@ -621,6 +626,7 @@ export interface ReplyView {
commentHandle: string;
topicHandle: string;
createdTime: Date;
lastUpdatedTime: Date;
user: UserCompactView;
text: string;
language?: string;
@ -675,10 +681,11 @@ export interface FeedResponseReplyView {
* @class
* Initializes a new instance of the PostReportRequest class.
* @constructor
* Request to post (create) a report for user or content
* Request to post (create) a report for content
* @member {string} reason Gets or sets report reason. Possible values
* include: 'Spam', 'Cyberbullying', 'ChildEndangerment', 'Offensive',
* 'ContentInfringement', 'Other'
* include: 'ThreatsCyberbullyingHarassment',
* 'ChildEndangermentExploitation', 'OffensiveContent',
* 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None'
*
*/
export interface PostReportRequest {
@ -698,6 +705,7 @@ export interface PostReportRequest {
* user code, or verifier obtained from third-party provider.
* The server contacts the third-party provider to use the token
* (or user code, or verifier) for discover the user's identity.
* For S2S auth, the access token must be set to the user handle
*
* @member {string} [requestToken] Gets or sets request token obtained from
* third-party provider.
@ -708,16 +716,12 @@ export interface PostReportRequest {
* @member {string} instanceId Gets or sets instance id -- Unique installation
* id of the app
*
* @member {boolean} [createUser] Gets or sets a value indicating whether we
* should create a new user if the user doesn't exist
*
*/
export interface PostSessionRequest {
identityProvider: string;
accessToken?: string;
requestToken?: string;
instanceId: string;
createUser?: boolean;
}
/**
@ -858,6 +862,66 @@ export interface PutTopicRequest {
categories?: string;
}
/**
* @class
* Initializes a new instance of the PostTopicNameRequest class.
* @constructor
* Post topic name request
* @member {string} publisherType Gets or sets publisher type. Possible values
* include: 'User', 'App'
*
* @member {string} topicName Gets or sets topic name
*
* @member {string} topicHandle Gets or sets topic handle
*
*/
export interface PostTopicNameRequest {
publisherType: string;
topicName: string;
topicHandle: string;
}
/**
* @class
* Initializes a new instance of the PutTopicNameRequest class.
* @constructor
* Request to put (update) a topic name
* @member {string} publisherType Gets or sets publisher type. Possible values
* include: 'User', 'App'
*
* @member {string} topicHandle Gets or sets topic handle
*
*/
export interface PutTopicNameRequest {
publisherType: string;
topicHandle: string;
}
/**
* @class
* Initializes a new instance of the DeleteTopicNameRequest class.
* @constructor
* Request to delete a topic name
* @member {string} publisherType Gets or sets publisher type. Possible values
* include: 'User', 'App'
*
*/
export interface DeleteTopicNameRequest {
publisherType: string;
}
/**
* @class
* Initializes a new instance of the GetTopicNameResponse class.
* @constructor
* Response from get topic name
* @member {string} topicHandle Gets or sets topic handle of the response
*
*/
export interface GetTopicNameResponse {
topicHandle: string;
}
/**
* @class
* Initializes a new instance of the PostLinkedAccountRequest class.
@ -1001,7 +1065,7 @@ export interface PostUserResponse {
* 'Pending', 'Blocked'
*
* @member {string} profileStatus Gets or sets user profile status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
*/
export interface UserProfileView {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
/* jshint latedef:false */
@ -43,6 +43,10 @@ exports.PostBlockedUserRequest = require('./postBlockedUserRequest');
exports.PostTopicRequest = require('./postTopicRequest');
exports.PostTopicResponse = require('./postTopicResponse');
exports.PutTopicRequest = require('./putTopicRequest');
exports.PostTopicNameRequest = require('./postTopicNameRequest');
exports.PutTopicNameRequest = require('./putTopicNameRequest');
exports.DeleteTopicNameRequest = require('./deleteTopicNameRequest');
exports.GetTopicNameResponse = require('./getTopicNameResponse');
exports.PostLinkedAccountRequest = require('./postLinkedAccountRequest');
exports.LinkedAccountView = require('./linkedAccountView');
exports.PostUserRequest = require('./postUserRequest');

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -10,10 +10,11 @@
* @class
* Initializes a new instance of the PostReportRequest class.
* @constructor
* Request to post (create) a report for user or content
* Request to post (create) a report for content
* @member {string} reason Gets or sets report reason. Possible values
* include: 'Spam', 'Cyberbullying', 'ChildEndangerment', 'Offensive',
* 'ContentInfringement', 'Other'
* include: 'ThreatsCyberbullyingHarassment',
* 'ChildEndangermentExploitation', 'OffensiveContent',
* 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None'
*
*/
function PostReportRequest() {
@ -38,7 +39,7 @@ PostReportRequest.prototype.mapper = function () {
serializedName: 'reason',
type: {
name: 'Enum',
allowedValues: [ 'Spam', 'Cyberbullying', 'ChildEndangerment', 'Offensive', 'ContentInfringement', 'Other' ]
allowedValues: [ 'ThreatsCyberbullyingHarassment', 'ChildEndangermentExploitation', 'OffensiveContent', 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None' ]
}
}
}

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -19,6 +19,7 @@
* user code, or verifier obtained from third-party provider.
* The server contacts the third-party provider to use the token
* (or user code, or verifier) for discover the user's identity.
* For S2S auth, the access token must be set to the user handle
*
* @member {string} [requestToken] Gets or sets request token obtained from
* third-party provider.
@ -29,9 +30,6 @@
* @member {string} instanceId Gets or sets instance id -- Unique installation
* id of the app
*
* @member {boolean} [createUser] Gets or sets a value indicating whether we
* should create a new user if the user doesn't exist
*
*/
function PostSessionRequest() {
}
@ -78,13 +76,6 @@ PostSessionRequest.prototype.mapper = function () {
type: {
name: 'String'
}
},
createUser: {
required: false,
serializedName: 'createUser',
type: {
name: 'Boolean'
}
}
}
}

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -21,6 +21,8 @@ var models = require('./index');
*
* @member {date} createdTime Gets or sets created time
*
* @member {date} lastUpdatedTime Gets or sets last updated time
*
* @member {object} user Gets or sets owner of the reply
*
* @member {string} [user.userHandle] Gets or sets user handle
@ -50,7 +52,7 @@ var models = require('./index');
* querying user has liked the reply
*
* @member {string} [contentStatus] Gets or sets content status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
*/
function ReplyView() {
@ -98,6 +100,13 @@ ReplyView.prototype.mapper = function () {
name: 'DateTime'
}
},
lastUpdatedTime: {
required: true,
serializedName: 'lastUpdatedTime',
type: {
name: 'DateTime'
}
},
user: {
required: true,
serializedName: 'user',
@ -139,7 +148,7 @@ ReplyView.prototype.mapper = function () {
serializedName: 'contentStatus',
type: {
name: 'Enum',
allowedValues: [ 'Active', 'Banned' ]
allowedValues: [ 'Active', 'Banned', 'Mature', 'Clean' ]
}
}
}

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -22,7 +22,7 @@ var models = require('./index');
* @member {string} publisherType Gets or sets publisher type. Possible values
* include: 'User', 'App'
*
* @member {object} user Gets or sets owner of the topic
* @member {object} [user] Gets or sets owner of the topic
*
* @member {string} [user.userHandle] Gets or sets user handle
*
@ -73,7 +73,7 @@ var models = require('./index');
* querying user has pinned the topic
*
* @member {string} [contentStatus] Gets or sets content status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
* @member {object} [app] Gets or sets the containing app
*
@ -140,7 +140,7 @@ TopicView.prototype.mapper = function () {
}
},
user: {
required: true,
required: false,
serializedName: 'user',
type: {
name: 'Composite',
@ -251,7 +251,7 @@ TopicView.prototype.mapper = function () {
serializedName: 'contentStatus',
type: {
name: 'Enum',
allowedValues: [ 'Active', 'Banned' ]
allowedValues: [ 'Active', 'Banned', 'Mature', 'Clean' ]
}
},
app: {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,7 +43,7 @@
* 'Pending', 'Blocked'
*
* @member {string} profileStatus Gets or sets user profile status. Possible
* values include: 'Active', 'Banned'
* values include: 'Active', 'Banned', 'Mature', 'Clean'
*
*/
function UserProfileView() {
@ -162,7 +162,7 @@ UserProfileView.prototype.mapper = function () {
serializedName: 'profileStatus',
type: {
name: 'Enum',
allowedValues: [ 'Active', 'Banned' ]
allowedValues: [ 'Active', 'Banned', 'Mature', 'Clean' ]
}
}
}

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -44,8 +44,8 @@ function Blobs(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -94,7 +94,7 @@ Blobs.prototype.postBlob = function (authorization, blob, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/blobs';
'//v0.4/blobs';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -194,8 +194,8 @@ Blobs.prototype.postBlob = function (authorization, blob, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -243,7 +243,7 @@ Blobs.prototype.getBlob = function (blobHandle, authorization, options, callback
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/blobs/{blobHandle}';
'//v0.4/blobs/{blobHandle}';
requestUrl = requestUrl.replace('{blobHandle}', encodeURIComponent(blobHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -31,19 +31,6 @@ function Builds(client) {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.authorization] Authentication (must begin with
* string "Bearer "). Possible values are:
*
* -sessionToken for client auth
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
@ -69,27 +56,10 @@ Builds.prototype.getBuildsCurrent = function (options, callback) {
if (!callback) {
throw new Error('callback cannot be null.');
}
var appkey = (options && options.appkey !== undefined) ? options.appkey : undefined;
var authorization = (options && options.authorization !== undefined) ? options.authorization : undefined;
var userHandle = (options && options.userHandle !== undefined) ? options.userHandle : undefined;
// Validate
try {
if (appkey !== null && appkey !== undefined && typeof appkey.valueOf() !== 'string') {
throw new Error('appkey must be of type string.');
}
if (authorization !== null && authorization !== undefined && typeof authorization.valueOf() !== 'string') {
throw new Error('authorization must be of type string.');
}
if (userHandle !== null && userHandle !== undefined && typeof userHandle.valueOf() !== 'string') {
throw new Error('userHandle must be of type string.');
}
} catch (error) {
return callback(error);
}
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/builds/current';
'//v0.4/builds/current';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -100,15 +70,6 @@ Builds.prototype.getBuildsCurrent = function (options, callback) {
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
if (appkey !== undefined && appkey !== null) {
httpRequest.headers['appkey'] = appkey;
}
if (authorization !== undefined && authorization !== null) {
httpRequest.headers['Authorization'] = authorization;
}
if (userHandle !== undefined && userHandle !== null) {
httpRequest.headers['UserHandle'] = userHandle;
}
if(options) {
for(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function CommentLikes(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -105,7 +105,7 @@ CommentLikes.prototype.getLikes = function (commentHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}/likes';
'//v0.4/comments/{commentHandle}/likes';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -214,8 +214,8 @@ CommentLikes.prototype.getLikes = function (commentHandle, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -263,7 +263,7 @@ CommentLikes.prototype.postLike = function (commentHandle, authorization, option
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}/likes';
'//v0.4/comments/{commentHandle}/likes';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -368,8 +368,8 @@ CommentLikes.prototype.postLike = function (commentHandle, authorization, option
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -417,7 +417,7 @@ CommentLikes.prototype.deleteLike = function (commentHandle, authorization, opti
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}/likes/me';
'//v0.4/comments/{commentHandle}/likes/me';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function CommentReplies(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -104,7 +104,7 @@ CommentReplies.prototype.getReplies = function (commentHandle, options, callback
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}/replies';
'//v0.4/comments/{commentHandle}/replies';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -219,8 +219,8 @@ CommentReplies.prototype.getReplies = function (commentHandle, options, callback
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -272,7 +272,7 @@ CommentReplies.prototype.postReply = function (commentHandle, request, authoriza
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}/replies';
'//v0.4/comments/{commentHandle}/replies';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -25,7 +25,7 @@ function CommentReports(client) {
}
/**
* @summary Report comment
* @summary Report a comment as spam, offensive, etc.
*
* @param {string} commentHandle Comment handle for the comment being reported
* on
@ -33,8 +33,9 @@ function CommentReports(client) {
* @param {object} postReportRequest Post report request
*
* @param {string} [postReportRequest.reason] Gets or sets report reason.
* Possible values include: 'Spam', 'Cyberbullying', 'ChildEndangerment',
* 'Offensive', 'ContentInfringement', 'Other'
* Possible values include: 'ThreatsCyberbullyingHarassment',
* 'ChildEndangermentExploitation', 'OffensiveContent',
* 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None'
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -48,8 +49,8 @@ function CommentReports(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -100,7 +101,7 @@ CommentReports.prototype.postReport = function (commentHandle, postReportRequest
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}/reports';
'//v0.4/comments/{commentHandle}/reports';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -150,7 +151,7 @@ CommentReports.prototype.postReport = function (commentHandle, postReportRequest
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 409 && statusCode !== 500) {
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 500) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -41,8 +41,8 @@ function Comments(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -91,7 +91,7 @@ Comments.prototype.getComment = function (commentHandle, authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}';
'//v0.4/comments/{commentHandle}';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -190,8 +190,8 @@ Comments.prototype.getComment = function (commentHandle, authorization, options,
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -239,7 +239,7 @@ Comments.prototype.deleteComment = function (commentHandle, authorization, optio
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/comments/{commentHandle}';
'//v0.4/comments/{commentHandle}';
requestUrl = requestUrl.replace('{commentHandle}', encodeURIComponent(commentHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -39,8 +39,8 @@ function Hashtags(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -86,7 +86,7 @@ Hashtags.prototype.getTrendingHashtags = function (options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/hashtags/trending';
'//v0.4/hashtags/trending';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -197,8 +197,8 @@ Hashtags.prototype.getTrendingHashtags = function (options, callback) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -247,7 +247,7 @@ Hashtags.prototype.getAutocompletedHashtags = function (query, options, callback
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/hashtags/autocomplete';
'//v0.4/hashtags/autocomplete';
var queryParameters = [];
queryParameters.push('query=' + encodeURIComponent(query));
if (queryParameters.length > 0) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -61,8 +61,8 @@ function Images(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -119,7 +119,7 @@ Images.prototype.postImage = function (imageType, authorization, image, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/images/{imageType}';
'//v0.4/images/{imageType}';
requestUrl = requestUrl.replace('{imageType}', encodeURIComponent(imageType));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -220,8 +220,8 @@ Images.prototype.postImage = function (imageType, authorization, image, options,
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -270,7 +270,7 @@ Images.prototype.getImage = function (blobHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/images/{blobHandle}';
'//v0.4/images/{blobHandle}';
requestUrl = requestUrl.replace('{blobHandle}', encodeURIComponent(blobHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

606
operations/index.d.ts поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
/* jshint latedef:false */

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -44,8 +44,8 @@ function MyAppFollowing(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +99,7 @@ MyAppFollowing.prototype.getUsers = function (appHandle, authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/apps/{appHandle}/following/difference';
'//v0.4/users/me/apps/{appHandle}/following/difference';
requestUrl = requestUrl.replace('{appHandle}', encodeURIComponent(appHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -39,8 +39,8 @@ function MyApps(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -85,7 +85,7 @@ MyApps.prototype.getApps = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/apps';
'//v0.4/users/me/apps';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,8 +43,8 @@ function MyBlockedUsers(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +99,7 @@ MyBlockedUsers.prototype.getBlockedUsers = function (authorization, options, cal
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/blocked_users';
'//v0.4/users/me/blocked_users';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -209,8 +209,8 @@ MyBlockedUsers.prototype.getBlockedUsers = function (authorization, options, cal
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -258,7 +258,7 @@ MyBlockedUsers.prototype.postBlockedUser = function (request, authorization, opt
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/blocked_users';
'//v0.4/users/me/blocked_users';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -376,8 +376,8 @@ MyBlockedUsers.prototype.postBlockedUser = function (request, authorization, opt
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -425,7 +425,7 @@ MyBlockedUsers.prototype.deleteBlockedUser = function (userHandle, authorization
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/blocked_users/{userHandle}';
'//v0.4/users/me/blocked_users/{userHandle}';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,8 +43,8 @@ function MyFollowers(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +99,7 @@ MyFollowers.prototype.getFollowers = function (authorization, options, callback)
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/followers';
'//v0.4/users/me/followers';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -209,8 +209,8 @@ MyFollowers.prototype.getFollowers = function (authorization, options, callback)
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -258,7 +258,7 @@ MyFollowers.prototype.postFollower = function (request, authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/followers';
'//v0.4/users/me/followers';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -376,8 +376,8 @@ MyFollowers.prototype.postFollower = function (request, authorization, options,
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -425,7 +425,7 @@ MyFollowers.prototype.deleteFollower = function (userHandle, authorization, opti
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/followers/{userHandle}';
'//v0.4/users/me/followers/{userHandle}';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -25,7 +25,7 @@ function MyFollowing(client) {
}
/**
* @summary Get my following
* @summary Get the feed of users that I am following
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -43,8 +43,8 @@ function MyFollowing(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +99,7 @@ MyFollowing.prototype.getFollowing = function (authorization, options, callback)
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/following';
'//v0.4/users/me/following';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -191,7 +191,7 @@ MyFollowing.prototype.getFollowing = function (authorization, options, callback)
};
/**
* @summary Follow user
* @summary Follow a user
*
* @param {object} request Post following request
*
@ -209,8 +209,8 @@ MyFollowing.prototype.getFollowing = function (authorization, options, callback)
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -258,7 +258,7 @@ MyFollowing.prototype.postFollowing = function (request, authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/following';
'//v0.4/users/me/following';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -360,7 +360,7 @@ MyFollowing.prototype.postFollowing = function (request, authorization, options,
};
/**
* @summary Unfollow user
* @summary Unfollow a user
*
* @param {string} userHandle User handle
*
@ -376,8 +376,8 @@ MyFollowing.prototype.postFollowing = function (request, authorization, options,
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -425,7 +425,7 @@ MyFollowing.prototype.deleteFollowing = function (userHandle, authorization, opt
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/following/{userHandle}';
'//v0.4/users/me/following/{userHandle}';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -514,7 +514,12 @@ MyFollowing.prototype.deleteFollowing = function (userHandle, authorization, opt
};
/**
* @summary Hide topic from my following topics
* @summary Remove a topic from the feed of topics authored by users that I'm
* following
*
* My following topics feed is a feed of topics created by users that I am
* following.
* This API call will remove the specified topic from that feed.
*
* @param {string} topicHandle Topic handle
*
@ -530,8 +535,8 @@ MyFollowing.prototype.deleteFollowing = function (userHandle, authorization, opt
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -579,7 +584,7 @@ MyFollowing.prototype.deleteTopic = function (topicHandle, authorization, option
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/following/topics/{topicHandle}';
'//v0.4/users/me/following/topics/{topicHandle}';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -668,7 +673,19 @@ MyFollowing.prototype.deleteTopic = function (topicHandle, authorization, option
};
/**
* @summary Get my following topic feed
* @summary Get the feed of topics authored by users that I'm following
*
* My following topics feed is a list of topics posted by users that I am
* following.
* This feed is time ordered, with the most recent topic first.
* This feed will not include topics that I have explicitly
* deleted from this feed.
* When I follow a user, all of their past topics will be added to
* this feed, and all their
* future topics will be added to this feed when they are created.
* When I unfollow a user, all of their previous topics will be
* removed from the feed and
* none of their future topics will be added to this feed.
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -686,8 +703,8 @@ MyFollowing.prototype.deleteTopic = function (topicHandle, authorization, option
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -741,7 +758,7 @@ MyFollowing.prototype.getTopics = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/following/topics';
'//v0.4/users/me/following/topics';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -833,7 +850,23 @@ MyFollowing.prototype.getTopics = function (authorization, options, callback) {
};
/**
* @summary Get my following activity feed
* @summary Get the feed of activities by users that I'm following.
*
* My following activity feed is a list of activities performed by users that
* I am following.
* This feed is time ordered, with the most recent activity first.
* An activity is added to this feed when a user I am following
* does one of the following 4 actions:
* (a) create a comment; (b) create a reply; (c) like a topic; (d)
* follow a user.
* If a user that I am following is deleted, then their past
* activities will no longer appear in this feed.
* If an activity is performed on content that is then deleted,
* that activity will no longer appear in this feed.
* If a user has un-done an activity (e.g. unlike a previous
* like), then that activity will no longer appear in this feed.
* Ignore the unread status of each activity - it will always be
* true.
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -851,8 +884,8 @@ MyFollowing.prototype.getTopics = function (authorization, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -907,7 +940,7 @@ MyFollowing.prototype.getActivities = function (authorization, options, callback
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/following/activities';
'//v0.4/users/me/following/activities';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,8 +43,8 @@ function MyLikes(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -98,7 +98,7 @@ MyLikes.prototype.getLikedTopics = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/likes/topics';
'//v0.4/users/me/likes/topics';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -39,8 +39,8 @@ function MyLinkedAccounts(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -85,7 +85,7 @@ MyLinkedAccounts.prototype.getLinkedAccounts = function (authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/linked_accounts';
'//v0.4/users/me/linked_accounts';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -212,8 +212,8 @@ MyLinkedAccounts.prototype.getLinkedAccounts = function (authorization, options,
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -261,7 +261,7 @@ MyLinkedAccounts.prototype.postLinkedAccount = function (request, authorization,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/linked_accounts';
'//v0.4/users/me/linked_accounts';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -380,8 +380,8 @@ MyLinkedAccounts.prototype.postLinkedAccount = function (request, authorization,
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -434,7 +434,7 @@ MyLinkedAccounts.prototype.deleteLinkedAccount = function (identityProvider, aut
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/linked_accounts/{identityProvider}';
'//v0.4/users/me/linked_accounts/{identityProvider}';
requestUrl = requestUrl.replace('{identityProvider}', encodeURIComponent(identityProvider));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -27,6 +27,17 @@ function MyNotifications(client) {
/**
* @summary Update notifications status
*
* This API call records the most recent notification that the user has read
* (or seen).
* In the GET notifications API call, each notification will have
* an unread status.
* Any notifications that are newer than this ReadActivityHandle
* will have an unread status of true.
* Any notifications that correspond to this ReadActivityHandle or
* older will have an unread status of false.
* If this API call has never been made, then all notifications
* will have an unread status of true.
*
* @param {object} request Put notifications status request
*
* @param {string} [request.readActivityHandle] Gets or sets last read
@ -44,8 +55,8 @@ function MyNotifications(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -93,7 +104,7 @@ MyNotifications.prototype.putNotificationsStatus = function (request, authorizat
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/notifications/status';
'//v0.4/users/me/notifications/status';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -195,7 +206,24 @@ MyNotifications.prototype.putNotificationsStatus = function (request, authorizat
};
/**
* @summary Get notifications
* @summary Get my notifications
*
* This gets a feed of activities.
* This feed is time ordered, with the most recent activity first.
* An activity is added to this feed when any user other than
* myself does one of the following 6 actions:
* (a) creates a comment to my topic; (b) creates a reply to my
* comment; (c) likes my topic; (d) follows me;
* (e) requests to follow me when I'm a private user; (f) accepts
* my request to follow them when they are a private user.
* Each activity has an unread status, which is controlled by
* doing a PUT on the status API call.
* If a user that performed the activity is deleted, then that
* activity will no longer appear in this feed.
* If an activity is performed on content that is then deleted,
* that activity will no longer appear in this feed.
* If a user has un-done an activity (e.g. unlike a previous
* like), then that activity will no longer appear in this feed.
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -213,8 +241,8 @@ MyNotifications.prototype.putNotificationsStatus = function (request, authorizat
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -269,7 +297,7 @@ MyNotifications.prototype.getNotifications = function (authorization, options, c
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/notifications';
'//v0.4/users/me/notifications';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -363,6 +391,9 @@ MyNotifications.prototype.getNotifications = function (authorization, options, c
/**
* @summary Get unread notifications count
*
* This returns a count of activities in my notification feed that have an
* unread status of true.
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
*
@ -375,8 +406,8 @@ MyNotifications.prototype.getNotifications = function (authorization, options, c
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -422,7 +453,7 @@ MyNotifications.prototype.getNotificationsCount = function (authorization, optio
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/notifications/count';
'//v0.4/users/me/notifications/count';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -41,8 +41,8 @@ function MyPendingUsers(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -90,7 +90,7 @@ MyPendingUsers.prototype.deletePendingUser = function (userHandle, authorization
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/pending_users/{userHandle}';
'//v0.4/users/me/pending_users/{userHandle}';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -197,8 +197,8 @@ MyPendingUsers.prototype.deletePendingUser = function (userHandle, authorization
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -253,7 +253,7 @@ MyPendingUsers.prototype.getPendingUsers = function (authorization, options, cal
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/pending_users';
'//v0.4/users/me/pending_users';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -359,8 +359,8 @@ MyPendingUsers.prototype.getPendingUsers = function (authorization, options, cal
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -406,7 +406,7 @@ MyPendingUsers.prototype.getPendingUsersCount = function (authorization, options
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/pending_users/count';
'//v0.4/users/me/pending_users/count';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,8 +43,8 @@ function MyPins(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -98,7 +98,7 @@ MyPins.prototype.getPins = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/pins';
'//v0.4/users/me/pins';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -208,8 +208,8 @@ MyPins.prototype.getPins = function (authorization, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -257,7 +257,7 @@ MyPins.prototype.postPin = function (request, authorization, options, callback)
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/pins';
'//v0.4/users/me/pins';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -375,8 +375,8 @@ MyPins.prototype.postPin = function (request, authorization, options, callback)
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -424,7 +424,7 @@ MyPins.prototype.deletePin = function (topicHandle, authorization, options, call
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/pins/{topicHandle}';
'//v0.4/users/me/pins/{topicHandle}';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -25,7 +25,13 @@ function MyPushRegistrations(client) {
}
/**
* @summary Register for push notifications or update existing registration
* @summary Register for push notifications or update an existing registration
*
* A push notification will be generated and sent for each activity in my
* notifications feed where the unread status is true.
* If multiple devices register for push notifications, then all
* those devices
* will get push notifications.
*
* @param {string} platform Platform type. Possible values include: 'Windows',
* 'Android', 'IOS'
@ -58,8 +64,8 @@ function MyPushRegistrations(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -118,7 +124,7 @@ MyPushRegistrations.prototype.putPushRegistration = function (platform, registra
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/push_registrations/{platform}/{registrationId}';
'//v0.4/users/me/push_registrations/{platform}/{registrationId}';
requestUrl = requestUrl.replace('{platform}', encodeURIComponent(platform));
requestUrl = requestUrl.replace('{registrationId}', encodeURIComponent(registrationId));
// trim all duplicate forward slashes in the url
@ -246,8 +252,8 @@ MyPushRegistrations.prototype.putPushRegistration = function (platform, registra
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -303,7 +309,7 @@ MyPushRegistrations.prototype.deletePushRegistration = function (platform, regis
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/push_registrations/{platform}/{registrationId}';
'//v0.4/users/me/push_registrations/{platform}/{registrationId}';
requestUrl = requestUrl.replace('{platform}', encodeURIComponent(platform));
requestUrl = requestUrl.replace('{registrationId}', encodeURIComponent(registrationId));
// trim all duplicate forward slashes in the url

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,8 +43,8 @@ function MyTopics(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -98,7 +98,7 @@ MyTopics.prototype.getTopics = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/topics';
'//v0.4/users/me/topics';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -208,8 +208,8 @@ MyTopics.prototype.getTopics = function (authorization, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -263,7 +263,7 @@ MyTopics.prototype.getPopularTopics = function (authorization, options, callback
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/topics/popular';
'//v0.4/users/me/topics/popular';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor.toString()));

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -41,8 +41,8 @@ function Replies(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -91,7 +91,7 @@ Replies.prototype.getReply = function (replyHandle, authorization, options, call
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/replies/{replyHandle}';
'//v0.4/replies/{replyHandle}';
requestUrl = requestUrl.replace('{replyHandle}', encodeURIComponent(replyHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -190,8 +190,8 @@ Replies.prototype.getReply = function (replyHandle, authorization, options, call
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -239,7 +239,7 @@ Replies.prototype.deleteReply = function (replyHandle, authorization, options, c
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/replies/{replyHandle}';
'//v0.4/replies/{replyHandle}';
requestUrl = requestUrl.replace('{replyHandle}', encodeURIComponent(replyHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function ReplyLikes(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -105,7 +105,7 @@ ReplyLikes.prototype.getLikes = function (replyHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/replies/{replyHandle}/likes';
'//v0.4/replies/{replyHandle}/likes';
requestUrl = requestUrl.replace('{replyHandle}', encodeURIComponent(replyHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -214,8 +214,8 @@ ReplyLikes.prototype.getLikes = function (replyHandle, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -263,7 +263,7 @@ ReplyLikes.prototype.postLike = function (replyHandle, authorization, options, c
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/replies/{replyHandle}/likes';
'//v0.4/replies/{replyHandle}/likes';
requestUrl = requestUrl.replace('{replyHandle}', encodeURIComponent(replyHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -368,8 +368,8 @@ ReplyLikes.prototype.postLike = function (replyHandle, authorization, options, c
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -417,7 +417,7 @@ ReplyLikes.prototype.deleteLike = function (replyHandle, authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/replies/{replyHandle}/likes/me';
'//v0.4/replies/{replyHandle}/likes/me';
requestUrl = requestUrl.replace('{replyHandle}', encodeURIComponent(replyHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -25,15 +25,16 @@ function ReplyReports(client) {
}
/**
* @summary Report reply
* @summary Report a reply as spam, offensive, etc.
*
* @param {string} replyHandle Reply handle for the reply being reported on
*
* @param {object} postReportRequest Post report request
*
* @param {string} [postReportRequest.reason] Gets or sets report reason.
* Possible values include: 'Spam', 'Cyberbullying', 'ChildEndangerment',
* 'Offensive', 'ContentInfringement', 'Other'
* Possible values include: 'ThreatsCyberbullyingHarassment',
* 'ChildEndangermentExploitation', 'OffensiveContent',
* 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None'
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -47,8 +48,8 @@ function ReplyReports(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +100,7 @@ ReplyReports.prototype.postReport = function (replyHandle, postReportRequest, au
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/replies/{replyHandle}/reports';
'//v0.4/replies/{replyHandle}/reports';
requestUrl = requestUrl.replace('{replyHandle}', encodeURIComponent(replyHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -149,7 +150,7 @@ ReplyReports.prototype.postReport = function (replyHandle, postReportRequest, au
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 409 && statusCode !== 500) {
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 500) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -42,8 +42,8 @@ function RequestTokens(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +99,7 @@ RequestTokens.prototype.getRequestToken = function (identityProvider, options, c
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/request_tokens/{identityProvider}';
'//v0.4/request_tokens/{identityProvider}';
requestUrl = requestUrl.replace('{identityProvider}', encodeURIComponent(identityProvider));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -66,8 +66,8 @@ function Search(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -125,7 +125,7 @@ Search.prototype.getTopics = function (query, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/search/topics';
'//v0.4/search/topics';
var queryParameters = [];
queryParameters.push('query=' + encodeURIComponent(query));
if (cursor !== null && cursor !== undefined) {
@ -254,8 +254,8 @@ Search.prototype.getTopics = function (query, options, callback) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -314,7 +314,7 @@ Search.prototype.getUsers = function (query, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/search/users';
'//v0.4/search/users';
var queryParameters = [];
queryParameters.push('query=' + encodeURIComponent(query));
if (cursor !== null && cursor !== undefined) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -37,6 +37,7 @@ function Sessions(client) {
* token, user code, or verifier obtained from third-party provider.
* The server contacts the third-party provider to use the token
* (or user code, or verifier) for discover the user's identity.
* For S2S auth, the access token must be set to the user handle
*
* @param {string} [request.requestToken] Gets or sets request token obtained
* from third-party provider.
@ -47,9 +48,6 @@ function Sessions(client) {
* @param {string} [request.instanceId] Gets or sets instance id -- Unique
* installation id of the app
*
* @param {boolean} [request.createUser] Gets or sets a value indicating
* whether we should create a new user if the user doesn't exist
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.appkey] App key must be filled in when using AAD
@ -62,8 +60,8 @@ function Sessions(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -113,7 +111,7 @@ Sessions.prototype.postSession = function (request, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/sessions';
'//v0.4/sessions';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -223,8 +221,8 @@ Sessions.prototype.postSession = function (request, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -269,7 +267,7 @@ Sessions.prototype.deleteSession = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/sessions/current';
'//v0.4/sessions/current';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function TopicComments(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -105,7 +105,7 @@ TopicComments.prototype.getTopicComments = function (topicHandle, options, callb
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}/comments';
'//v0.4/topics/{topicHandle}/comments';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -225,8 +225,8 @@ TopicComments.prototype.getTopicComments = function (topicHandle, options, callb
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -278,7 +278,7 @@ TopicComments.prototype.postComment = function (topicHandle, request, authorizat
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}/comments';
'//v0.4/topics/{topicHandle}/comments';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function TopicLikes(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -105,7 +105,7 @@ TopicLikes.prototype.getLikes = function (topicHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}/likes';
'//v0.4/topics/{topicHandle}/likes';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -214,8 +214,8 @@ TopicLikes.prototype.getLikes = function (topicHandle, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -263,7 +263,7 @@ TopicLikes.prototype.postLike = function (topicHandle, authorization, options, c
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}/likes';
'//v0.4/topics/{topicHandle}/likes';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -368,8 +368,8 @@ TopicLikes.prototype.postLike = function (topicHandle, authorization, options, c
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -417,7 +417,7 @@ TopicLikes.prototype.deleteLike = function (topicHandle, authorization, options,
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}/likes/me';
'//v0.4/topics/{topicHandle}/likes/me';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -25,15 +25,16 @@ function TopicReports(client) {
}
/**
* @summary Report topic
* @summary Report a topic as spam, offensive, etc.
*
* @param {string} topicHandle Topic handle being reported on
*
* @param {object} postReportRequest Post report request
*
* @param {string} [postReportRequest.reason] Gets or sets report reason.
* Possible values include: 'Spam', 'Cyberbullying', 'ChildEndangerment',
* 'Offensive', 'ContentInfringement', 'Other'
* Possible values include: 'ThreatsCyberbullyingHarassment',
* 'ChildEndangermentExploitation', 'OffensiveContent',
* 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None'
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -47,8 +48,8 @@ function TopicReports(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +100,7 @@ TopicReports.prototype.postReport = function (topicHandle, postReportRequest, au
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}/reports';
'//v0.4/topics/{topicHandle}/reports';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -149,7 +150,7 @@ TopicReports.prototype.postReport = function (topicHandle, postReportRequest, au
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 409 && statusCode !== 500) {
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 500) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -43,8 +43,8 @@ function Topics(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +99,7 @@ Topics.prototype.getTopics = function (options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics';
'//v0.4/topics';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -229,8 +229,8 @@ Topics.prototype.getTopics = function (options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -279,7 +279,7 @@ Topics.prototype.postTopic = function (request, authorization, options, callback
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics';
'//v0.4/topics';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -391,8 +391,8 @@ Topics.prototype.postTopic = function (request, authorization, options, callback
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -442,7 +442,7 @@ Topics.prototype.getTopic = function (topicHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}';
'//v0.4/topics/{topicHandle}';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -549,8 +549,8 @@ Topics.prototype.getTopic = function (topicHandle, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -601,7 +601,7 @@ Topics.prototype.putTopic = function (topicHandle, request, authorization, optio
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}';
'//v0.4/topics/{topicHandle}';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -720,8 +720,8 @@ Topics.prototype.putTopic = function (topicHandle, request, authorization, optio
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -769,7 +769,7 @@ Topics.prototype.deleteTopic = function (topicHandle, authorization, options, ca
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/{topicHandle}';
'//v0.4/topics/{topicHandle}';
requestUrl = requestUrl.replace('{topicHandle}', encodeURIComponent(topicHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -879,8 +879,8 @@ Topics.prototype.deleteTopic = function (topicHandle, authorization, options, ca
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -943,7 +943,7 @@ Topics.prototype.getPopularTopics = function (timeRange, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/popular/{timeRange}';
'//v0.4/topics/popular/{timeRange}';
requestUrl = requestUrl.replace('{timeRange}', encodeURIComponent(timeRange));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -1054,8 +1054,8 @@ Topics.prototype.getPopularTopics = function (timeRange, options, callback) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -1110,7 +1110,7 @@ Topics.prototype.getFeaturedTopics = function (options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/topics/featured';
'//v0.4/topics/featured';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor));
@ -1201,5 +1201,699 @@ Topics.prototype.getFeaturedTopics = function (options, callback) {
});
};
/**
* @summary Create a topic name
*
* @param {object} request Post topic name request
*
* @param {string} [request.publisherType] Gets or sets publisher type.
* Possible values include: 'User', 'App'
*
* @param {string} [request.topicName] Gets or sets topic name
*
* @param {string} [request.topicHandle] Gets or sets topic handle
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
*
* -sessionToken for client auth
*
* -AAD token for service auth
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} callback
*
* @returns {function} callback(err, result, request, response)
*
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
Topics.prototype.postTopicName = function (request, authorization, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
var appkey = (options && options.appkey !== undefined) ? options.appkey : undefined;
var userHandle = (options && options.userHandle !== undefined) ? options.userHandle : undefined;
// Validate
try {
if (request === null || request === undefined) {
throw new Error('request cannot be null or undefined.');
}
if (appkey !== null && appkey !== undefined && typeof appkey.valueOf() !== 'string') {
throw new Error('appkey must be of type string.');
}
if (authorization === null || authorization === undefined || typeof authorization.valueOf() !== 'string') {
throw new Error('authorization cannot be null or undefined and it must be of type string.');
}
if (userHandle !== null && userHandle !== undefined && typeof userHandle.valueOf() !== 'string') {
throw new Error('userHandle must be of type string.');
}
} catch (error) {
return callback(error);
}
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.4/topics/names';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'POST';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
if (appkey !== undefined && appkey !== null) {
httpRequest.headers['appkey'] = appkey;
}
if (authorization !== undefined && authorization !== null) {
httpRequest.headers['Authorization'] = authorization;
}
if (userHandle !== undefined && userHandle !== null) {
httpRequest.headers['UserHandle'] = userHandle;
}
if(options) {
for(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
// Serialize Request
var requestContent = null;
var requestModel = null;
try {
if (request !== null && request !== undefined) {
var requestModelMapper = new client.models['PostTopicNameRequest']().mapper();
requestModel = client.serialize(requestModelMapper, request, 'request');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
var serializationError = new Error(util.format('Error "%s" occurred in serializing the ' +
'payload - "%s"', error.message, util.inspect(request, {depth: null})));
return callback(serializationError);
}
httpRequest.body = requestContent;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 401 && statusCode !== 404 && statusCode !== 409 && statusCode !== 501) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var parsedErrorResponse;
try {
parsedErrorResponse = JSON.parse(responseBody);
if (parsedErrorResponse) {
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
// Deserialize Response
if (statusCode === 204) {
var parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = {
required: false,
serializedName: 'parsedResponse',
type: {
name: 'Object'
}
};
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
deserializationError.request = msRest.stripRequest(httpRequest);
deserializationError.response = msRest.stripResponse(response);
return callback(deserializationError);
}
}
return callback(null, result, httpRequest, response);
});
};
/**
* @summary Get a topic name
*
* @param {string} topicName Topic name
*
* @param {string} publisherType Publisher type. Possible values include:
* 'User', 'App'
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.authorization] Authentication (must begin with
* string "Bearer "). Possible values are:
*
* -sessionToken for client auth
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} callback
*
* @returns {function} callback(err, result, request, response)
*
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object.
* See {@link GetTopicNameResponse} for more information.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
Topics.prototype.getTopicName = function (topicName, publisherType, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
var appkey = (options && options.appkey !== undefined) ? options.appkey : undefined;
var authorization = (options && options.authorization !== undefined) ? options.authorization : undefined;
var userHandle = (options && options.userHandle !== undefined) ? options.userHandle : undefined;
// Validate
try {
if (topicName === null || topicName === undefined || typeof topicName.valueOf() !== 'string') {
throw new Error('topicName cannot be null or undefined and it must be of type string.');
}
if (publisherType) {
var allowedValues = [ 'User', 'App' ];
if (!allowedValues.some( function(item) { return item === publisherType; })) {
throw new Error(publisherType + ' is not a valid value. The valid values are: ' + allowedValues);
}
} else {
throw new Error('publisherType cannot be null or undefined.');
}
if (appkey !== null && appkey !== undefined && typeof appkey.valueOf() !== 'string') {
throw new Error('appkey must be of type string.');
}
if (authorization !== null && authorization !== undefined && typeof authorization.valueOf() !== 'string') {
throw new Error('authorization must be of type string.');
}
if (userHandle !== null && userHandle !== undefined && typeof userHandle.valueOf() !== 'string') {
throw new Error('userHandle must be of type string.');
}
} catch (error) {
return callback(error);
}
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.4/topics/names/{topicName}';
requestUrl = requestUrl.replace('{topicName}', encodeURIComponent(topicName));
var queryParameters = [];
queryParameters.push('publisherType=' + encodeURIComponent(publisherType));
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
}
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'GET';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
if (appkey !== undefined && appkey !== null) {
httpRequest.headers['appkey'] = appkey;
}
if (authorization !== undefined && authorization !== null) {
httpRequest.headers['Authorization'] = authorization;
}
if (userHandle !== undefined && userHandle !== null) {
httpRequest.headers['UserHandle'] = userHandle;
}
if(options) {
for(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
httpRequest.body = null;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 200 && statusCode !== 401 && statusCode !== 404 && statusCode !== 501) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var parsedErrorResponse;
try {
parsedErrorResponse = JSON.parse(responseBody);
if (parsedErrorResponse) {
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
// Deserialize Response
if (statusCode === 200) {
var parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = new client.models['GetTopicNameResponse']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
deserializationError.request = msRest.stripRequest(httpRequest);
deserializationError.response = msRest.stripResponse(response);
return callback(deserializationError);
}
}
return callback(null, result, httpRequest, response);
});
};
/**
* @summary Update a topic name
*
* @param {string} topicName Topic name
*
* @param {object} request Update topic name request
*
* @param {string} [request.publisherType] Gets or sets publisher type.
* Possible values include: 'User', 'App'
*
* @param {string} [request.topicHandle] Gets or sets topic handle
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
*
* -sessionToken for client auth
*
* -AAD token for service auth
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} callback
*
* @returns {function} callback(err, result, request, response)
*
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
Topics.prototype.putTopicName = function (topicName, request, authorization, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
var appkey = (options && options.appkey !== undefined) ? options.appkey : undefined;
var userHandle = (options && options.userHandle !== undefined) ? options.userHandle : undefined;
// Validate
try {
if (topicName === null || topicName === undefined || typeof topicName.valueOf() !== 'string') {
throw new Error('topicName cannot be null or undefined and it must be of type string.');
}
if (request === null || request === undefined) {
throw new Error('request cannot be null or undefined.');
}
if (appkey !== null && appkey !== undefined && typeof appkey.valueOf() !== 'string') {
throw new Error('appkey must be of type string.');
}
if (authorization === null || authorization === undefined || typeof authorization.valueOf() !== 'string') {
throw new Error('authorization cannot be null or undefined and it must be of type string.');
}
if (userHandle !== null && userHandle !== undefined && typeof userHandle.valueOf() !== 'string') {
throw new Error('userHandle must be of type string.');
}
} catch (error) {
return callback(error);
}
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.4/topics/names/{topicName}';
requestUrl = requestUrl.replace('{topicName}', encodeURIComponent(topicName));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'PUT';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
if (appkey !== undefined && appkey !== null) {
httpRequest.headers['appkey'] = appkey;
}
if (authorization !== undefined && authorization !== null) {
httpRequest.headers['Authorization'] = authorization;
}
if (userHandle !== undefined && userHandle !== null) {
httpRequest.headers['UserHandle'] = userHandle;
}
if(options) {
for(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
// Serialize Request
var requestContent = null;
var requestModel = null;
try {
if (request !== null && request !== undefined) {
var requestModelMapper = new client.models['PutTopicNameRequest']().mapper();
requestModel = client.serialize(requestModelMapper, request, 'request');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
var serializationError = new Error(util.format('Error "%s" occurred in serializing the ' +
'payload - "%s"', error.message, util.inspect(request, {depth: null})));
return callback(serializationError);
}
httpRequest.body = requestContent;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 401 && statusCode !== 404 && statusCode !== 501) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var parsedErrorResponse;
try {
parsedErrorResponse = JSON.parse(responseBody);
if (parsedErrorResponse) {
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
// Deserialize Response
if (statusCode === 204) {
var parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = {
required: false,
serializedName: 'parsedResponse',
type: {
name: 'Object'
}
};
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
deserializationError.request = msRest.stripRequest(httpRequest);
deserializationError.response = msRest.stripResponse(response);
return callback(deserializationError);
}
}
return callback(null, result, httpRequest, response);
});
};
/**
* @summary Delete a topic name
*
* @param {string} topicName Topic name
*
* @param {object} request Delete topic request
*
* @param {string} [request.publisherType] Gets or sets publisher type.
* Possible values include: 'User', 'App'
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
*
* -sessionToken for client auth
*
* -AAD token for service auth
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} callback
*
* @returns {function} callback(err, result, request, response)
*
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
Topics.prototype.deleteTopicName = function (topicName, request, authorization, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
var appkey = (options && options.appkey !== undefined) ? options.appkey : undefined;
var userHandle = (options && options.userHandle !== undefined) ? options.userHandle : undefined;
// Validate
try {
if (topicName === null || topicName === undefined || typeof topicName.valueOf() !== 'string') {
throw new Error('topicName cannot be null or undefined and it must be of type string.');
}
if (request === null || request === undefined) {
throw new Error('request cannot be null or undefined.');
}
if (appkey !== null && appkey !== undefined && typeof appkey.valueOf() !== 'string') {
throw new Error('appkey must be of type string.');
}
if (authorization === null || authorization === undefined || typeof authorization.valueOf() !== 'string') {
throw new Error('authorization cannot be null or undefined and it must be of type string.');
}
if (userHandle !== null && userHandle !== undefined && typeof userHandle.valueOf() !== 'string') {
throw new Error('userHandle must be of type string.');
}
} catch (error) {
return callback(error);
}
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.4/topics/names/{topicName}';
requestUrl = requestUrl.replace('{topicName}', encodeURIComponent(topicName));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'DELETE';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
if (appkey !== undefined && appkey !== null) {
httpRequest.headers['appkey'] = appkey;
}
if (authorization !== undefined && authorization !== null) {
httpRequest.headers['Authorization'] = authorization;
}
if (userHandle !== undefined && userHandle !== null) {
httpRequest.headers['UserHandle'] = userHandle;
}
if(options) {
for(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
// Serialize Request
var requestContent = null;
var requestModel = null;
try {
if (request !== null && request !== undefined) {
var requestModelMapper = new client.models['DeleteTopicNameRequest']().mapper();
requestModel = client.serialize(requestModelMapper, request, 'request');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
var serializationError = new Error(util.format('Error "%s" occurred in serializing the ' +
'payload - "%s"', error.message, util.inspect(request, {depth: null})));
return callback(serializationError);
}
httpRequest.body = requestContent;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 401 && statusCode !== 404 && statusCode !== 501) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var parsedErrorResponse;
try {
parsedErrorResponse = JSON.parse(responseBody);
if (parsedErrorResponse) {
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
// Deserialize Response
if (statusCode === 204) {
var parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = {
required: false,
serializedName: 'parsedResponse',
type: {
name: 'Object'
}
};
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
deserializationError.request = msRest.stripRequest(httpRequest);
deserializationError.response = msRest.stripResponse(response);
return callback(deserializationError);
}
}
return callback(null, result, httpRequest, response);
});
};
module.exports = Topics;

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function UserFollowers(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -104,7 +104,7 @@ UserFollowers.prototype.getFollowers = function (userHandle, authorization, opti
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/{userHandle}/followers';
'//v0.4/users/{userHandle}/followers';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function UserFollowing(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -104,7 +104,7 @@ UserFollowing.prototype.getFollowing = function (userHandle, authorization, opti
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/{userHandle}/following';
'//v0.4/users/{userHandle}/following';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -25,15 +25,19 @@ function UserReports(client) {
}
/**
* @summary Report a user
* @summary Report a user as spam, offensive, etc.
*
* @param {string} userHandle User handle for the user being reported on
* This call allows a user to complain about another user's profile content
* (photo, bio, name) as containing spam, offensive material, etc.
*
* @param {string} userHandle User handle being reported on
*
* @param {object} postReportRequest Post report request
*
* @param {string} [postReportRequest.reason] Gets or sets report reason.
* Possible values include: 'Spam', 'Cyberbullying', 'ChildEndangerment',
* 'Offensive', 'ContentInfringement', 'Other'
* Possible values include: 'ThreatsCyberbullyingHarassment',
* 'ChildEndangermentExploitation', 'OffensiveContent',
* 'VirusSpywareMalware', 'ContentInfringement', 'Other', 'None'
*
* @param {string} authorization Authentication (must begin with string
* "Bearer "). Possible values are:
@ -47,8 +51,8 @@ function UserReports(client) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -99,7 +103,7 @@ UserReports.prototype.postReport = function (userHandle, postReportRequest, auth
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/{userHandle}/reports';
'//v0.4/users/{userHandle}/reports';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -149,7 +153,7 @@ UserReports.prototype.postReport = function (userHandle, postReportRequest, auth
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 409 && statusCode !== 500) {
if (statusCode !== 204 && statusCode !== 400 && statusCode !== 401 && statusCode !== 404 && statusCode !== 500) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -45,8 +45,8 @@ function UserTopics(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -104,7 +104,7 @@ UserTopics.prototype.getTopics = function (userHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/{userHandle}/topics';
'//v0.4/users/{userHandle}/topics';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
@ -217,8 +217,8 @@ UserTopics.prototype.getTopics = function (userHandle, options, callback) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -276,7 +276,7 @@ UserTopics.prototype.getPopularTopics = function (userHandle, options, callback)
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/{userHandle}/topics/popular';
'//v0.4/users/{userHandle}/topics/popular';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
'use strict';
@ -93,8 +93,8 @@ function Users(client) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -144,7 +144,7 @@ Users.prototype.postUser = function (request, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users';
'//v0.4/users';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -254,8 +254,8 @@ Users.prototype.postUser = function (request, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -301,7 +301,7 @@ Users.prototype.getMyProfile = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me';
'//v0.4/users/me';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -397,8 +397,8 @@ Users.prototype.getMyProfile = function (authorization, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -443,7 +443,7 @@ Users.prototype.deleteUser = function (authorization, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me';
'//v0.4/users/me';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -553,8 +553,8 @@ Users.prototype.deleteUser = function (authorization, options, callback) {
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -602,7 +602,7 @@ Users.prototype.putUserInfo = function (request, authorization, options, callbac
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/info';
'//v0.4/users/me/info';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -722,8 +722,8 @@ Users.prototype.putUserInfo = function (request, authorization, options, callbac
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -771,7 +771,7 @@ Users.prototype.putUserPhoto = function (request, authorization, options, callba
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/photo';
'//v0.4/users/me/photo';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -892,8 +892,8 @@ Users.prototype.putUserPhoto = function (request, authorization, options, callba
* @param {string} [options.appkey] App key must be filled in when using AAD
* tokens for Authentication.
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -941,7 +941,7 @@ Users.prototype.putUserVisibility = function (request, authorization, options, c
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/me/visibility';
'//v0.4/users/me/visibility';
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
@ -1059,8 +1059,8 @@ Users.prototype.putUserVisibility = function (request, authorization, options, c
*
* -AAD token for service auth
*
* @param {string} [options.userHandle1] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle1] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -1110,7 +1110,7 @@ Users.prototype.getUser = function (userHandle, options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/{userHandle}';
'//v0.4/users/{userHandle}';
requestUrl = requestUrl.replace('{userHandle}', encodeURIComponent(userHandle));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
@ -1211,8 +1211,8 @@ Users.prototype.getUser = function (userHandle, options, callback) {
*
* -AAD token for service auth
*
* @param {string} [options.userHandle] User handle must be filled when using
* AAD tokens for Authentication.
* @param {string} [options.userHandle] This field is for internal use only.
* Do not provide a value except under special circumstances.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
@ -1268,7 +1268,7 @@ Users.prototype.getPopularUsers = function (options, callback) {
// Construct URL
var requestUrl = this.client.baseUri +
'//v0.3/users/popular';
'//v0.4/users/popular';
var queryParameters = [];
if (cursor !== null && cursor !== undefined) {
queryParameters.push('cursor=' + encodeURIComponent(cursor.toString()));

2
socialPlusClient.d.ts поставляемый
Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
import { ServiceClientOptions, RequestOptions, ServiceCallback } from 'ms-rest';

Просмотреть файл

@ -1,7 +1,7 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
* the MIT License. See LICENSE in the project root for license information.
* This file was generated using AutoRest.
* <autogenerated> This file was generated using AutoRest. </autogenerated>
*/
/* jshint latedef:false */
@ -41,7 +41,7 @@ function SocialPlusClient(baseUri, options) {
SocialPlusClient['super_'].call(this, null, options);
this.baseUri = baseUri;
if (!this.baseUri) {
this.baseUri = 'http://sp-ppe.cloudapp.net';
this.baseUri = 'https://api.embeddedsocial.microsoft.com';
}
this.blobs = new operations.Blobs(this);

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Разница между файлами не показана из-за своего большого размера Загрузить разницу