[ALERTE] Besoin d'un GÉNIE en Java/Android
Pour m'aider à documenter la v4 de l'API de jeuxvideo.com sur JVFlux.
Je ne pars pas de zéro, plus d'infos en MP.
Le 27 juillet 2023 à 16:21:30 Satisfaction06 a écrit :
Up
Le 27 juillet 2023 à 16:25:26 Satisfaction06 a écrit :
/// <summary>
/// Outputs the first active flow
/// </summary>
/// <param name="service">Authenticated client implementing the IOrganizationService interface</param>
public static void OutputFirstActiveFlow(IOrganizationService service)
{
var query = new QueryExpression("workflow")
{
ColumnSet = new ColumnSet("category",
"createdby",
"createdon",
"description",
"ismanaged",
"modifiedby",
"modifiedon",
"name",
"ownerid",
"statecode",
"type",
"workflowid",
"workflowidunique"),
Criteria = new FilterExpression(LogicalOperator.And)
{
Conditions = {
{ new ConditionExpression(
"category",
ConditionOperator.Equal,
5) }, // Cloud Flow
{ new ConditionExpression(
"statecode",
ConditionOperator.Equal,
1) } // Active
}
},
TopCount = 1 // Limit to one record
};
EntityCollection workflows = service.RetrieveMultiple(query);
Entity workflow = workflows.Entities.FirstOrDefault();
Console.WriteLine($"category: {workflow.FormattedValues["category"]}");
Console.WriteLine($"createdby: {workflow.FormattedValues["createdby"]}");
Console.WriteLine($"createdon: {workflow.FormattedValues["createdon"]}");
// Description may be null
Console.WriteLine($"description: {workflow.GetAttributeValue<string>("description")}");
Console.WriteLine($"ismanaged: {workflow.FormattedValues["ismanaged"]}");
Console.WriteLine($"modifiedby: {workflow.FormattedValues["modifiedby"]}");
Console.WriteLine($"modifiedon: {workflow.FormattedValues["modifiedon"]}");
Console.WriteLine($"name: {workflow["name"]}");
Console.WriteLine($"ownerid: {workflow.FormattedValues["ownerid"]}");
Console.WriteLine($"statecode: {workflow.FormattedValues["statecode"]}");
Console.WriteLine($"type: {workflow.FormattedValues["type"]}");
Console.WriteLine($"workflowid: {workflow["workflowid"]}");
Console.WriteLine($"workflowidunique: {workflow["workflowidunique"]}");
}
Le 27 juillet 2023 à 16:27:32 BCbeach a écrit :
/// <summary>
/// Outputs the first active flow
/// </summary>
/// <param name="service">Authenticated client implementing the IOrganizationService interface</param>
public static void OutputFirstActiveFlow(IOrganizationService service)
{
var query = new QueryExpression("workflow")
{
ColumnSet = new ColumnSet("category",
"createdby",
"createdon",
"description",
"ismanaged",
"modifiedby",
"modifiedon",
"name",
"ownerid",
"statecode",
"type",
"workflowid",
"workflowidunique"),
Criteria = new FilterExpression(LogicalOperator.And)
{
Conditions = {
{ new ConditionExpression(
"category",
ConditionOperator.Equal,
5) }, // Cloud Flow
{ new ConditionExpression(
"statecode",
ConditionOperator.Equal,
1) } // Active
}
},
TopCount = 1 // Limit to one record
};EntityCollection workflows = service.RetrieveMultiple(query);
Entity workflow = workflows.Entities.FirstOrDefault();
Console.WriteLine($"category: {workflow.FormattedValues["category"]}");
Console.WriteLine($"createdby: {workflow.FormattedValues["createdby"]}");
Console.WriteLine($"createdon: {workflow.FormattedValues["createdon"]}");
// Description may be null
Console.WriteLine($"description: {workflow.GetAttributeValue<string>("description")}");
Console.WriteLine($"ismanaged: {workflow.FormattedValues["ismanaged"]}");
Console.WriteLine($"modifiedby: {workflow.FormattedValues["modifiedby"]}");
Console.WriteLine($"modifiedon: {workflow.FormattedValues["modifiedon"]}");
Console.WriteLine($"name: {workflow["name"]}");
Console.WriteLine($"ownerid: {workflow.FormattedValues["ownerid"]}");
Console.WriteLine($"statecode: {workflow.FormattedValues["statecode"]}");
Console.WriteLine($"type: {workflow.FormattedValues["type"]}");
Console.WriteLine($"workflowid: {workflow["workflowid"]}");
Console.WriteLine($"workflowidunique: {workflow["workflowidunique"]}");
}
POST [Organization Uri]/api/data/v9.2/ImportSolution
OData-MaxVersion: 4.0
OData-Version: 4.0
If-None-Match: null
Accept: application/json
Content-Type: application/json; charset=utf-8
Content-Length: 4344
{
"OverwriteUnmanagedCustomizations": true,
"CustomizationFile": "UEsDBBQAAgAIA...<truncated for brevity>"
}
Le 27 juillet 2023 à 16:30:17 BCbeach a écrit :
POST [Organization Uri]/api/data/v9.2/ImportSolution
OData-MaxVersion: 4.0
OData-Version: 4.0
If-None-Match: null
Accept: application/json
Content-Type: application/json; charset=utf-8
Content-Length: 4344{
"OverwriteUnmanagedCustomizations": true,
"CustomizationFile": "UEsDBBQAAgAIA...<truncated for brevity>"
}
/// <summary>
/// Imports a solution.
/// </summary>
/// <param name="service">Authenticated client implementing the IOrganizationService interface</param>
/// <param name="solutionFile">The byte[] data representing a solution file. </param>
public static void ImportSolution(
IOrganizationService service,
byte[] solutionFile) {
ImportSolutionRequest request = new() {
OverwriteUnmanagedCustomizations = true,
CustomizationFile = solutionFile
};
service.Execute(request);
}
Données du topic
- Auteur
- Satisfaction06
- Date de création
- 27 juillet 2023 à 16:18:51
- Nb. messages archivés
- 37
- Nb. messages JVC
- 37