Class ItemActivityListParser
java.lang.Object
com.amilesend.onedrive.parse.resource.parser.ItemActivityListParser
- All Implemented Interfaces:
GsonParser<List<ItemActivity>>
Parses a response body that contains a list of
ItemActivity objects.
Example response body:
{
"value": [
{
"action": {
"comment": {}
},
"actor": {
"user": {
"displayName": "Xavier Wilke"
}
},
"id": "EJalEvjV1EgIYFQAAAAAAA==",
"times": {
"recordedDateTime": "2017-07-29T18:34:40Z"
}
},
{
"action": {
"edit": {},
"version": {
"newVersion": "2.0"
}
},
"actor": {
"user": {
"displayName": "Judith Clemons"
}
},
"id": "cInT6/fV1EgFYFQAAAAAAA==",
"times": {
"recordedDateTime": "2017-07-29T16:23:35Z"
}
},
{
"action": {
"mention": {
"mentionees": [
{
"user": {
"displayName": "Judith Clemons"
}
}
]
}
},
"actor": {
"user": {
"displayName": "Misty Suarez"
}
},
"id": "EBJa0vPV1EjFX1QAAAAAAA==",
"times": {
"recordedDateTime": "2017-07-28T20:14:14Z"
}
},
{
"action": {
"rename": {
"oldName": "Document2.docx"
}
},
"actor": {
"user": {
"displayName": "Misty Suarez"
}
},
"id": "QFJFlfPV1Ei/X1QAAAAAAA==",
"times": {
"recordedDateTime": "2017-07-28T20:12:32Z"
}
},
{
"action": {
"create": {}
},
"actor": {
"user": {
"displayName": "Misty Suarez"
}
},
"id": "IJydkPPV1Ei9X1QAAAAAAA==",
"times": {
"recordedDateTime": "2017-07-28T20:02:24Z"
}
}
]
}
API Documentation- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to deserialize a response body that contains a list of item activities. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(@NonNull com.google.gson.Gson gson, @NonNull InputStream jsonStream) Deserializes a JSON-formatted input stream to the defined POJO type.
-
Constructor Details
-
ItemActivityListParser
public ItemActivityListParser()
-
-
Method Details
-
parse
public List<ItemActivity> parse(@NonNull com.google.gson.Gson gson, @NonNull InputStream jsonStream) Description copied from interface:GsonParserDeserializes a JSON-formatted input stream to the defined POJO type.- Specified by:
parsein interfaceGsonParser<List<ItemActivity>>- Parameters:
gson- the Gson instance used to deserialize the stringjsonStream- stream with expected JSON-formatted contents- Returns:
- the parsed POJO instance
-