CSLibrary/DocumentGroup.cs
/// <summary>
/// Creates a multi-step invite for a document group.
/// </summary>
/// <param name="AccessToken"></param>
/// <param name="GroupId">Document Group Id</param>
/// <param name="DataObj">Data Object containing the Group Invite Parameters</param>
/// <param name="ResultFormat"></param>
/// <returns>Returns the new Document Group Invite Id</returns>
Creates a multi-step invite for a document group.
Creates a multi - step invite for a document group .
public static dynamic Invite(string AccessToken, string GroupId, dynamic DataObj, string ResultFormat = "JSON")
        {
            var client = new RestClient();
            client.BaseUrl = new Uri(Config.ApiHost);
            var request = new RestRequest("/documentgroup/" + GroupId + "/groupinvite", Method.POST)
                .AddHeader("Accept", "application/json")
                .AddHeader("Authorization", "Bearer " + AccessToken);
            request.RequestFormat = DataFormat.Json;
            request.AddBody(DataObj);
            var response = client.Execute(request);
            dynamic results = "";
            if (response.StatusCode == HttpStatusCode.OK)
            {
                results = response.Content;
            }
            else
            {
                Console.WriteLine(response.Content.ToString());
                results = response.Content.ToString();
            }
            if (ResultFormat == "JSON")
            {
                results = JsonConvert.DeserializeObject(results);
            }
            else if (ResultFormat == "XML")
            {
                results = (XmlDocument)JsonConvert.DeserializeXmlNode(results, "root");
            }
            return results;
        }
public static dynamic Invite ( string AccessToken , string GroupId , dynamic DataObj , string ResultFormat = " " ) { var client = new RestClient ( ) ; client . BaseUrl = new Uri ( Config . ApiHost ) ; var request = new RestRequest ( " " + GroupId + " " , Method . POST ) . AddHeader ( " " , " " ) . AddHeader ( " " , " " + AccessToken ) ; request . RequestFormat = DataFormat . Json ; request . AddBody ( DataObj ) ; var response = client . Execute ( request ) ; dynamic results = " " ; if ( response . StatusCode == HttpStatusCode . OK ) { results = response . Content ; } else { Console . WriteLine ( response . Content . ToString ( ) ) ; results = response . Content . ToString ( ) ; } if ( ResultFormat == " " ) { results = JsonConvert . DeserializeObject ( results ) ; } else if ( ResultFormat == " " ) { results = ( XmlDocument ) JsonConvert . DeserializeXmlNode ( results , " " ) ; } return results ; }
Creates a multi-step invite for a document group.
Creates a multi - step invite for a document group .
Returns the new Document Group Invite Id
Returns the new Document Group Invite Id
AccessToken
string
None
GroupId
string
Document Group Id
Document Group Id
DataObj
dynamic
Data Object containing the Group Invite Parameters
Data Object containing the Group Invite Parameters
ResultFormat
string
None