Module gpycat.models.gfy_item

Expand source code
from typing import List, Optional, Union

from pydantic import AnyHttpUrl, BaseModel, confloat, conint
from pydantic.color import Color


class UserData(BaseModel):
    followers: conint(ge=0)
    following: conint(ge=0)
    name: str
    profileImageUrl: AnyHttpUrl
    subscription: conint(ge=0)
    username: str
    verified: bool
    views: conint(ge=0)


class ContentUrlsContent(BaseModel):
    url: AnyHttpUrl
    size: confloat(gt=0)
    width: conint(gt=0)
    height: conint(gt=0)


class ContentUrls(BaseModel):
    gif100px: Optional[ContentUrlsContent]
    largeGif: Optional[ContentUrlsContent]
    max1mbGif: Optional[ContentUrlsContent]
    max2mbGif: Optional[ContentUrlsContent]
    max5mbGif: Optional[ContentUrlsContent]
    mobile: Optional[ContentUrlsContent]
    mobilePoster: Optional[ContentUrlsContent]
    mp4: Optional[ContentUrlsContent]
    webm: Optional[ContentUrlsContent]
    webp: Optional[ContentUrlsContent]


class GfyItem(BaseModel):
    avgColor: Color
    content_urls: ContentUrls
    createDate: str
    description: Optional[str]
    frameRate: Union[conint(gt=0), confloat(gt=0)]
    gatekeeper: int
    gfyId: str
    gfyName: str
    gfyNumber: str
    gfySlug: Optional[str]
    gif100px: Optional[AnyHttpUrl]
    gifUrl: Optional[AnyHttpUrl]
    hasAudio: bool
    hasTransparency: bool
    height: conint(gt=0)
    isSticker: bool
    languageCategories: List[Optional[str]]
    likes: conint(ge=0)
    max1mbGif: AnyHttpUrl
    max2mbGif: AnyHttpUrl
    max5mbGif: AnyHttpUrl
    md5: str
    miniPosterUrl: Optional[AnyHttpUrl]
    miniUrl: AnyHttpUrl
    mobilePosterUrl: Optional[AnyHttpUrl]
    mobileUrl: Optional[AnyHttpUrl]
    nsfw: conint(ge=0)
    numFrames: conint(gt=0)
    posterUrl: Optional[str]
    published: conint(ge=0)
    tags: List[Optional[str]]
    thumb100PosterUrl: Optional[AnyHttpUrl]
    title: Optional[str]
    userData: Optional[UserData]
    userDisplayName: Optional[str]
    username: str
    userProfileImageUrl: Optional[AnyHttpUrl]
    views: conint(ge=0)
    webmSize: confloat(gt=0)
    webmUrl: Optional[AnyHttpUrl]
    webpUrl: AnyHttpUrl
    width: conint(gt=0)

Classes

class ContentUrls (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class ContentUrls(BaseModel):
    gif100px: Optional[ContentUrlsContent]
    largeGif: Optional[ContentUrlsContent]
    max1mbGif: Optional[ContentUrlsContent]
    max2mbGif: Optional[ContentUrlsContent]
    max5mbGif: Optional[ContentUrlsContent]
    mobile: Optional[ContentUrlsContent]
    mobilePoster: Optional[ContentUrlsContent]
    mp4: Optional[ContentUrlsContent]
    webm: Optional[ContentUrlsContent]
    webp: Optional[ContentUrlsContent]

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var gif100px : Optional[ContentUrlsContent]
var largeGif : Optional[ContentUrlsContent]
var max1mbGif : Optional[ContentUrlsContent]
var max2mbGif : Optional[ContentUrlsContent]
var max5mbGif : Optional[ContentUrlsContent]
var mobile : Optional[ContentUrlsContent]
var mobilePoster : Optional[ContentUrlsContent]
var mp4 : Optional[ContentUrlsContent]
var webm : Optional[ContentUrlsContent]
var webp : Optional[ContentUrlsContent]
class ContentUrlsContent (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class ContentUrlsContent(BaseModel):
    url: AnyHttpUrl
    size: confloat(gt=0)
    width: conint(gt=0)
    height: conint(gt=0)

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var height : gpycat.models.gfy_item.ConstrainedIntValue
var size : gpycat.models.gfy_item.ConstrainedFloatValue
var url : pydantic.networks.AnyHttpUrl
var width : gpycat.models.gfy_item.ConstrainedIntValue
class GfyItem (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class GfyItem(BaseModel):
    avgColor: Color
    content_urls: ContentUrls
    createDate: str
    description: Optional[str]
    frameRate: Union[conint(gt=0), confloat(gt=0)]
    gatekeeper: int
    gfyId: str
    gfyName: str
    gfyNumber: str
    gfySlug: Optional[str]
    gif100px: Optional[AnyHttpUrl]
    gifUrl: Optional[AnyHttpUrl]
    hasAudio: bool
    hasTransparency: bool
    height: conint(gt=0)
    isSticker: bool
    languageCategories: List[Optional[str]]
    likes: conint(ge=0)
    max1mbGif: AnyHttpUrl
    max2mbGif: AnyHttpUrl
    max5mbGif: AnyHttpUrl
    md5: str
    miniPosterUrl: Optional[AnyHttpUrl]
    miniUrl: AnyHttpUrl
    mobilePosterUrl: Optional[AnyHttpUrl]
    mobileUrl: Optional[AnyHttpUrl]
    nsfw: conint(ge=0)
    numFrames: conint(gt=0)
    posterUrl: Optional[str]
    published: conint(ge=0)
    tags: List[Optional[str]]
    thumb100PosterUrl: Optional[AnyHttpUrl]
    title: Optional[str]
    userData: Optional[UserData]
    userDisplayName: Optional[str]
    username: str
    userProfileImageUrl: Optional[AnyHttpUrl]
    views: conint(ge=0)
    webmSize: confloat(gt=0)
    webmUrl: Optional[AnyHttpUrl]
    webpUrl: AnyHttpUrl
    width: conint(gt=0)

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var avgColor : pydantic.color.Color
var content_urlsContentUrls
var createDate : str
var description : Optional[str]
var frameRate : Union[gpycat.models.gfy_item.ConstrainedIntValue, gpycat.models.gfy_item.ConstrainedFloatValue]
var gatekeeper : int
var gfyId : str
var gfyName : str
var gfyNumber : str
var gfySlug : Optional[str]
var gif100px : Optional[pydantic.networks.AnyHttpUrl]
var gifUrl : Optional[pydantic.networks.AnyHttpUrl]
var hasAudio : bool
var hasTransparency : bool
var height : gpycat.models.gfy_item.ConstrainedIntValue
var isSticker : bool
var languageCategories : List[Optional[str]]
var likes : gpycat.models.gfy_item.ConstrainedIntValue
var max1mbGif : pydantic.networks.AnyHttpUrl
var max2mbGif : pydantic.networks.AnyHttpUrl
var max5mbGif : pydantic.networks.AnyHttpUrl
var md5 : str
var miniPosterUrl : Optional[pydantic.networks.AnyHttpUrl]
var miniUrl : pydantic.networks.AnyHttpUrl
var mobilePosterUrl : Optional[pydantic.networks.AnyHttpUrl]
var mobileUrl : Optional[pydantic.networks.AnyHttpUrl]
var nsfw : gpycat.models.gfy_item.ConstrainedIntValue
var numFrames : gpycat.models.gfy_item.ConstrainedIntValue
var posterUrl : Optional[str]
var published : gpycat.models.gfy_item.ConstrainedIntValue
var tags : List[Optional[str]]
var thumb100PosterUrl : Optional[pydantic.networks.AnyHttpUrl]
var title : Optional[str]
var userData : Optional[UserData]
var userDisplayName : Optional[str]
var userProfileImageUrl : Optional[pydantic.networks.AnyHttpUrl]
var username : str
var views : gpycat.models.gfy_item.ConstrainedIntValue
var webmSize : gpycat.models.gfy_item.ConstrainedFloatValue
var webmUrl : Optional[pydantic.networks.AnyHttpUrl]
var webpUrl : pydantic.networks.AnyHttpUrl
var width : gpycat.models.gfy_item.ConstrainedIntValue
class UserData (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class UserData(BaseModel):
    followers: conint(ge=0)
    following: conint(ge=0)
    name: str
    profileImageUrl: AnyHttpUrl
    subscription: conint(ge=0)
    username: str
    verified: bool
    views: conint(ge=0)

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var followers : gpycat.models.gfy_item.ConstrainedIntValue
var following : gpycat.models.gfy_item.ConstrainedIntValue
var name : str
var profileImageUrl : pydantic.networks.AnyHttpUrl
var subscription : gpycat.models.gfy_item.ConstrainedIntValue
var username : str
var verified : bool
var views : gpycat.models.gfy_item.ConstrainedIntValue