Class DriveItemVersionListParser
java.lang.Object
com.amilesend.onedrive.parse.resource.parser.DriveItemVersionListParser
- All Implemented Interfaces:
GsonParser<List<DriveItemVersion>>
public class DriveItemVersionListParser
extends Object
implements GsonParser<List<DriveItemVersion>>
Parses a response body that contains a list of
DriveItemVersions.
Example response body:
{
"value":
[
{
"id": "3.0",
"lastModifiedBy": {
"user": {
"id": "CE251278-EF9E-4FE5-833C-1D89EEAE68E0",
"displayName": "Ryan Gregg"
}
},
"lastModifiedDateTime": "2017-09-14T12:34:53.912Z",
"size": 123
},
{
"id": "2.0",
"lastModifiedBy": {
"user": {
"id": "CE251278-EF9E-4FE5-833C-1D89EEAE68E0",
"displayName": "Ryan Gregg"
}
},
"lastModifiedDateTime": "2017-09-11T10:21:03.000Z",
"size": 62
},
{
"id": "1.0",
"lastModifiedBy": {
"user": {
"id": "CE251278-EF9E-4FE5-833C-1D89EEAE68E0",
"displayName": "Ryan Gregg"
}
},
"lastModifiedDateTime": "2017-09-10T15:20:01.125Z",
"size": 16
}
]
}
API Documentation- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to deserialize a response body that contains a list of drive item versions. -
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
-
DriveItemVersionListParser
-
-
Method Details
-
parse
public List<DriveItemVersion> 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<DriveItemVersion>>- Parameters:
gson- the Gson instance used to deserialize the stringjsonStream- stream with expected JSON-formatted contents- Returns:
- the parsed POJO instance
-