예제 #1
0
		/// <summary>
		/// Installs the app with the given id on the space.
		/// <para>Podio API Reference: https://developers.podio.com/doc/applications/install-app-22506 </para>
		/// </summary>
		/// <param name="appId">The application identifier.</param>
		/// <param name="spaceId">The space identifier.</param>
		/// <param name="features">The features that should be installed with the app. Options are: filters, tasks, widgets, integration, forms, items. If the value is not given all but the "items" feature will be selected.</param>
		/// <returns>Task&lt;System.Int32&gt;.</returns>
		public async Task<int> InstallApp(int appId, int spaceId, string[] features = null)
		{
			features = features == null ? new string[] { "items" } : features;
			string url = string.Format("/app/{0}/install", appId);
			dynamic requestData = new
			{
				space_id = spaceId,
				features = features
			};
			dynamic response = await _podio.PostAsync<dynamic>(url, requestData);
			return (int)response["app_id"];
		}
예제 #2
0
		/// <summary>
		/// Updates the app with a new description.
		/// <para>Podio API Reference: https://developers.podio.com/doc/applications/update-app-description-33569973 </para>
		/// </summary>
		/// <param name="appId">The application identifier.</param>
		/// <param name="description">The description.</param>
		/// <returns>Task.</returns>
		public async Task UpdateAppDescription(int appId, string description)
		{
			string url = string.Format("/app/{0}/description", appId);
			dynamic requestData = new
			{
				description = description
			};
			await _podio.PutAsync<dynamic>(url, requestData);
		}
예제 #3
0
		/// <summary>
		/// Updates the usage instructions for the app.
		/// <para>Podio API Reference:https://developers.podio.com/doc/applications/update-app-usage-instructions-33570086 </para>
		/// </summary>
		/// <param name="appId">The application identifier.</param>
		/// <param name="usage">The usage.</param>
		/// <returns>Task.</returns>
		public async Task UpdateAppUsageInstructions(int appId, string usage)
		{
			string url = string.Format("/app/{0}/usage", appId);
			dynamic requestData = new
			{
				usage = usage
			};
			await _podio.PutAsync<dynamic>(url, requestData);
		}
예제 #4
0
		/// <summary>
		/// Deletes a field on an app. When deleting a field any new items and updates to existing items will not have this field present. For existing items, the field will still be presented when viewing the item.
		/// <para>Podio API Reference: https://developers.podio.com/doc/applications/delete-app-field-22355 </para>
		/// </summary>
		/// <param name="appId">The application identifier.</param>
		/// <param name="fieldId">The field identifier.</param>
		/// <param name="deleteValues">True if the values for the fields should be deleted, false otherwise Default value: false</param>
		/// <returns>Task&lt;ApplicationRevision&gt;.</returns>
		public async Task<ApplicationRevision> DeleteAppField(int appId, int fieldId, bool deleteValues = false)
		{
			string url = string.Format("/app/{0}/field/{1}", appId, fieldId);
			dynamic requestData = new
			{
				delete_values = deleteValues.ToString()
			};
			return await _podio.DeleteAsync<ApplicationRevision>(url, requestData);
		}