<commit_before>package models.vimeo.video

/**
  * path = /pictures
  *
  * author: cvandrei
  * since: 2016-02-01
  */
// TODO unit tests
case class Pictures(uri: String,
                    active: Boolean,
                    pictureType: String,
                    sizes: List[Size]
                   )

object Pictures {

  import play.api.libs.json.Reads._
  import play.api.libs.json._

  implicit object PicturesReads extends Format[Pictures] {

    override def reads(json: JsValue): JsResult[Pictures] = {

      val pictures = Pictures(
        (json \ "uri").as[String],
        (json \ "active").as[Boolean],
        (json \ "type").as[String],
        (json \ "sizes").as[List[Size]]
      )
      JsSuccess(pictures)
    }

    def writes(p: Pictures): JsValue = {
      Json.obj(<commit_msg>delete outdated TODO<commit_after>package models.vimeo.video

/**
  * path = /pictures
  *
  * author: cvandrei
  * since: 2016-02-01
  */
case class Pictures(uri: String,
                    active: Boolean,
                    pictureType: String,
                    sizes: List[Size]
                   )

object Pictures {

  import play.api.libs.json.Reads._
  import play.api.libs.json._

  implicit object PicturesReads extends Format[Pictures] {

    override def reads(json: JsValue): JsResult[Pictures] = {

      val pictures = Pictures(
        (json \ "uri").as[String],
        (json \ "active").as[Boolean],
        (json \ "type").as[String],
        (json \ "sizes").as[List[Size]]
      )
      JsSuccess(pictures)
    }

    def writes(p: Pictures): JsValue = {
      Json.obj(
{'fraction_non_alphanumeric': 0.1295143212951432, 'fraction_numerical': 0.009962640099626401, 'mean_word_length': 1.9704251386321627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2348737', 'n_tokens_mistral': 535, 'n_tokens_neox': 492, 'n_words': 106}