Merge pull request #105 from onerain88/get-support-include
LCQuery#Get 支持 include
commit
4d94bbcd32
|
@ -351,7 +351,14 @@ namespace LeanCloud.Storage {
|
||||||
throw new ArgumentNullException(nameof(objectId));
|
throw new ArgumentNullException(nameof(objectId));
|
||||||
}
|
}
|
||||||
string path = $"classes/{ClassName}/{objectId}";
|
string path = $"classes/{ClassName}/{objectId}";
|
||||||
Dictionary<string, object> response = await LCApplication.HttpClient.Get<Dictionary<string, object>>(path);
|
Dictionary<string, object> queryParams = null;
|
||||||
|
string includes = Condition.BuildIncludes();
|
||||||
|
if (!string.IsNullOrEmpty(includes)) {
|
||||||
|
queryParams = new Dictionary<string, object> {
|
||||||
|
{ "include", includes }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Dictionary<string, object> response = await LCApplication.HttpClient.Get<Dictionary<string, object>>(path, queryParams: queryParams);
|
||||||
return DecodeLCObject(response);
|
return DecodeLCObject(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue