Package com.restfb

Klasse Parameter

java.lang.Object
com.restfb.Parameter

public final class Parameter extends Object
Representation of a Facebook API request parameter.
Autor:
Mark Allen
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    final String
    Parameter name.
    final String
    Parameter value.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
     
    int
     
     
    static Parameter
    with(String name, Object value)
    Factory method which provides an instance with the given name and value.
    static Parameter
    with(String name, Object value, JsonMapper jsonMapper)
    Factory method which provides an instance with the given name and value, using the provided jsonMapper to turn value 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 API
    static Parameter
    withLimit(int limit)
    convenience factory method which creates a Parameter object to fetch data from API with given limit
    static Parameter
    convenience factory method which creates a Parameter object to fetch data from API with given locale
    static Parameter
    Convenience factory method that creates a Parameter object to retrieve the metadata from the API.

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Felddetails

  • Methodendetails

    • with

      public static Parameter with(String name, Object value)
      Factory method which provides an instance with the given name and value.

      The value parameter is often a String or primitive type like Integer, but you may pass in a List, 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 given name and value.
      Löst aus:
      IllegalArgumentException - If name or value is null or a blank string.
      FacebookJsonMappingException - If an error occurs when converting value to JSON.
    • withFields

      public static Parameter withFields(String fieldList)
      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

      public static Parameter withMetadata()
      Convenience factory method that creates a Parameter object to retrieve the metadata from the API.
      Gibt zurück:
      Parameter object
    • withLocale

      public static Parameter withLocale(Locale locale)
      convenience factory method which creates a Parameter 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

      public static Parameter withLimit(int limit)
      convenience factory method which creates a Parameter 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

      public static Parameter with(String name, Object value, JsonMapper jsonMapper)
      Factory method which provides an instance with the given name and value, using the provided jsonMapper to turn value into a JSON string.

      The value parameter is often a String or primitive type like Integer, but you may pass in a List, 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 given name and value.
      Löst aus:
      IllegalArgumentException - If name or value is null or a blank string.
      FacebookJsonMappingException - If an error occurs when converting value to JSON.
    • equals

      public boolean equals(Object obj)
      Setzt außer Kraft:
      equals in Klasse Object
      Siehe auch:
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object