コード例 #1
0
        public static async Task <GetFieldResponse> GetTelematicsNodeFieldsExample(int nodeId)
        {
            TelematicsV2     telematicsV2 = new TelematicsV2(publicKey, privateKey, userKey);
            GetFieldResponse response     = await telematicsV2.GetTelematicsNodeFields(nodeId);

            return(response);
        }
コード例 #2
0
		public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null) {
			if(response != null && type == Type.OBJECT) {
				int index = keys.IndexOf(name);
				if(index >= 0) {
					response.Invoke(list[index]);
					return;
				}
			}
			if(fail != null) fail.Invoke(name);
		}
コード例 #3
0
        /// <summary>
        /// The GET TelematicsNodeV2/{telematicsNodeId}/Fields endpoint retrieves a list of fields associated with the provided telematics node.
        /// </summary>
        /// <param name="nodeId"></param>
        /// <returns></returns>
        public async Task <GetFieldResponse> GetTelematicsNodeFields(int nodeId)
        {
            Dictionary <string, string> headers = ApiUtilities.BuildHeaders(UserKey, PublicKey, PrivateKey, $"telematicsnodev2/{nodeId}/fields");

            HttpResponseMessage response = await Api.Get($"telematicsnodev2/{nodeId}/fields", headers);

            GetFieldResponse result = await Api.DeserializeContent <GetFieldResponse>(response);

            return(result);
        }
コード例 #4
0
 public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && IsObject)
     {
         int num = keys.IndexOf(name);
         if (num >= 0)
         {
             response(list[num]);
             return;
         }
     }
     fail?.Invoke(name);
 }
コード例 #5
0
 public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && this.IsObject)
     {
         int num = this.keys.IndexOf(name);
         if (num >= 0)
         {
             response(this.list[num]);
             return;
         }
     }
     if (fail != null)
     {
         fail(name);
     }
 }
コード例 #6
0
 private void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && IsObject)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             response.Invoke(list[index]);
             return;
         }
     }
     if (fail != null)
     {
         fail.Invoke(name);
     }
 }
コード例 #7
0
 public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && IsObject)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             response.Invoke(list[index]);
             return;
         }
     }
     if (fail != null)
         fail.Invoke(name);
 }
コード例 #8
0
ファイル: JSONObject.cs プロジェクト: ddiep003/DANK-TANKZ
 // Default parameters fix
 public void GetField(string name, GetFieldResponse response)
 {
     GetField(name, response, null);
 }
コード例 #9
0
ファイル: JSONObject.cs プロジェクト: NotYours180/lockstep.io
	public void GetField (string name, GetFieldResponse response, FieldNotFound fail) 
	{
		if (response != null && type == JSONType.OBJECT) 
		{
			int index = keys.IndexOf(name);
			if (index >= 0) 
			{
				response.Invoke(list[index]);
				return;
			}
		}
		if(fail != null) 
		{
			fail.Invoke(name);
		}
	}
コード例 #10
0
ファイル: JSONObject.cs プロジェクト: NotYours180/lockstep.io
	public void GetField (string name, GetFieldResponse response) 
	{ 
		GetField(name, response, null); 
	}
コード例 #11
0
        public static async Task <GetFieldResponse> GetTelematicsNodeFieldsExample(int nodeId)
        {
            GetFieldResponse response = await DataExchangeAPI.GetTelematicsNodeFields(nodeId);

            return(response);
        }