public async Task <Track> RegisterTrackingWebhook(string carrier, string trackingNumber, string metadata = null)
        {
            // For now the trailing '/' is required.
            string ep = string.Format("{0}/tracks/", apiEndpoint);

            var createTrack = new CreateTrack
            {
                Carrier        = carrier,
                TrackingNumber = trackingNumber,
                Metadata       = metadata
            };

            return(await this.apiClient.DoRequestAsync <Track>(ep, HttpMethod.Post, Serialize(createTrack)));
        }
Esempio n. 2
0
 void CreateNewTrack()
 {
     // There is no overwrite protection here!
     // There is No "Are you sure you want to overwrite your existing object?" if it exists.
     // This should probably get a string from the user to create a new name and pass it ...
     viewIndex       = 1;
     trackScriptable = CreateTrack.Create();
     if (trackScriptable)
     {
         trackScriptable.chorusList = new List <ChorusScriptable>();
         string relPath = AssetDatabase.GetAssetPath(trackScriptable);
         EditorPrefs.SetString("ObjectPath", relPath);
     }
 }