eyes.schema

eyes schema module

Eyes graphQL schemas module

class eyes.schema.DictType(*args, **kwargs)

Graphene dict type

static serialize(dt)

Serialize method

Parameters

dt (str) –

static parse_literal(node)

Parse literal method

Parameters

node (relay.Node) –

static parse_value(value)

Parse value method

Parameters

value (str) –

class eyes.schema.PttComment(*args, **kwargs)

Ptt comment GraphQL schema

connection

alias of graphene.types.base.PttCommentConnection

class eyes.schema.PttPost(*args, **kwargs)

Ptt post GraphQL schema

connection

alias of graphene.types.base.PttPostConnection

class eyes.schema.MonthSummary(*args, **kwargs)

Monthly summary schema

class eyes.schema.DailySummary(*args, **kwargs)

Daily summary schema

class eyes.schema.WikiEntity(*args, **kwargs)

Wiki entity

connection

alias of graphene.types.base.WikiEntityConnection

class eyes.schema.EntitySummary(*args, **kwargs)

Entity summary

connection

alias of graphene.types.base.EntitySummaryConnection

class eyes.schema.Query(*args, **kwargs)

GraphQL Query definitions

resolve_ptt_post(info, post_id)

Resolve ptt post

Parameters

post_id (str) – PTT post id

Returns

ptt.PttPost

resolve_ptt_posts(info, post_ids)

Resolve ptt posts

Parameters

post_ids (List[str]) – Ptt post ids

Returns

List[ptt.PttPost]

resolve_monthly_summary(info, source, year, month)

Resolve monthly summary

Parameters
  • source (int) –

  • year (int) –

  • month (int) –

Returns

stats.MonthlySummary

resolve_monthly_summaries(info, source, limit)

Resolve monthly summaries

Parameters
  • source (int) –

  • limit (int) –

Returns

List[stats.MonthlySummary]

resolve_daily_summaries(info, source, limit)

Resolve daily summaries

Parameters
  • source (int) –

  • last (int) –

Returns

List[stats.DailySummary]

resolve_entity_summary(info, name, year, month)

Resolve entity summary

Parameters
  • name (str) –

  • year (int) –

  • month (int) –

Returns

stats.EntitySummary

resolve_all_stats_entity_summaries(info, year, month, min_count, limit)

Resolve all stats entity summary

Parameters
  • year (int) – Year

  • month (int) – Month

  • limit (int) – Max number of entities

Returns

List[stats.EntitySummary]