Package com.restfb
Klasse Parameter
java.lang.Object
com.restfb.Parameter
Representation of a Facebook API request parameter.
- Autor:
- Mark Allen
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
int
hashCode()
toString()
static Parameter
Factory method which provides an instance with the givenname
andvalue
.static Parameter
with
(String name, Object value, JsonMapper jsonMapper) Factory method which provides an instance with the givenname
andvalue
, using the providedjsonMapper
to turnvalue
into a JSON string.static Parameter
withFields
(String fieldList) convenience factory method which needs a comma separated list of fields that the dev likes to fetch from the APIstatic Parameter
withLimit
(int limit) convenience factory method which creates aParameter
object to fetch data from API with given limitstatic Parameter
withLocale
(Locale locale) convenience factory method which creates aParameter
object to fetch data from API with given localestatic Parameter
Convenience factory method that creates aParameter
object to retrieve the metadata from the API.
-
Felddetails
-
name
Parameter name. -
value
Parameter value.
-
-
Methodendetails
-
with
Factory method which provides an instance with the givenname
andvalue
.The
value
parameter is often aString
or primitive type likeInteger
, but you may pass in aList
,Map
, or your own @Facebook-annotated Javabean and it will be converted to JSON automatically. See the "attachment" section of the stream.publish API documentation for an example of where this is useful.- Parameter:
name
- The parameter name.value
- The parameter value.- Gibt zurück:
- A
Parameter
instance with the givenname
andvalue
. - Löst aus:
IllegalArgumentException
- Ifname
orvalue
isnull
or a blank string.FacebookJsonMappingException
- If an error occurs when convertingvalue
to JSON.
-
withFields
convenience factory method which needs a comma separated list of fields that the dev likes to fetch from the API- Parameter:
fieldList
- comma separated list of fields- Gibt zurück:
- Parameter object
-
withMetadata
Convenience factory method that creates aParameter
object to retrieve the metadata from the API.- Gibt zurück:
- Parameter object
-
withLocale
convenience factory method which creates aParameter
object to fetch data from API with given locale- Parameter:
locale
- the locale that should be used to fetch the data- Gibt zurück:
- Parameter object
-
withLimit
convenience factory method which creates aParameter
object to fetch data from API with given limit- Parameter:
limit
- the limit that should be used fetching data- Gibt zurück:
- Parameter object
-
with
Factory method which provides an instance with the givenname
andvalue
, using the providedjsonMapper
to turnvalue
into a JSON string.The
value
parameter is often aString
or primitive type likeInteger
, but you may pass in aList
,Map
, or your own @Facebook-annotated Javabean and it will be converted to JSON automatically. See the "attachment" section of the stream.publish API documentation for an example of where this is useful.- Parameter:
name
- The parameter name.value
- The parameter value.jsonMapper
- The jsonMapper- Gibt zurück:
- A
Parameter
instance with the givenname
andvalue
. - Löst aus:
IllegalArgumentException
- Ifname
orvalue
isnull
or a blank string.FacebookJsonMappingException
- If an error occurs when convertingvalue
to JSON.
-
equals
-
hashCode
-
toString
-