final case class Resp(resp: String, page: Int = 0, errMsg: Option[String] = None) extends Product with Serializable
Cases class modelizing the server's response to request. Allows doing several useful operations with it (i.e. ask for next page). NB: Can contain an error !
- resp
raw Json response from server
- Alphabetic
- By Inheritance
- Resp
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Resp(resp: String, page: Int = 0, errMsg: Option[String] = None)
- resp
raw Json response from server
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val errMsg: Option[String]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasNext: Boolean
- def isError: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def jsonObj: JsonObject
Directly convert the server's response from json string to a
JsonObject
(apigoogle.Gson
)Directly convert the server's response from json string to a
JsonObject
(apigoogle.Gson
)- returns
JsonObject
that can be traversed kind of like a Map with aget()
method (no need to manually parse it) Ifthis.isError
:
- Annotations
- @throws(classOf[IllegalArgumentException])
- Exceptions thrown
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def next(_nb: Int = 0): Option[Resp]
- _nb
Page number (if optional defaults to
this.page + 1
)- returns
Next page for current request or None if page didn't have a next field / request failed
- def nextAll(size: Int = 0): Vector[JsonObject]
Follows each
next
link, extracting the underlyingJsonObject
until there is no more result to getFollows each
next
link, extracting the underlyingJsonObject
until there is no more result to getNOTE: This method needs only to be called when retrieving study plans
- size
amount of element to get for each parallel request
- returns
Vector of each response's page
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- val page: Int
- def prettify: String
- returns
Prettified json response
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val resp: String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Resp → AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated