> ## Documentation Index
> Fetch the complete documentation index at: https://docs.followw.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Consultar notícias recentes das turmas atuais

> Até cinco notícias. updating indica atualização pendente; texto e anexos completos ficam no detalhe do post.



## OpenAPI

````yaml /mintlify/openapi.json get /posts/news
openapi: 3.1.0
info:
  title: Followw UnB API
  description: >-
    API independente e open-source para consultar dados do SIGAA e de outros
    sistemas da UnB. O acesso autenticado usa a conta do SIGAA, com sessão por
    cookies.
  version: 0.1.0
servers:
  - url: https://api.followw.app
    description: Produção
  - url: http://localhost:8000
    description: Desenvolvimento local
security: []
tags:
  - name: Auth
    description: Login no SIGAA e sessão por cookies.
  - name: Classrooms
    description: Turmas, participantes, frequência e resultados acadêmicos.
  - name: Me
    description: Perfil, configurações, documentos e acesso ao RU.
  - name: Public Classrooms
    description: Turmas e unidades do SIGAA.
    x-displayName: Classrooms
  - name: Public Courses
    description: Cursos e currículos por ingresso.
    x-displayName: Courses
  - name: Public Professors
    description: Catálogo de docentes.
    x-displayName: Professors
  - name: Public Restaurant
    description: Cardápio do RU.
    x-displayName: Restaurant
  - name: Public Search
    description: Busca de matérias, cursos e docentes.
    x-displayName: Search
  - name: Public Subjects
    description: Matérias de graduação e suas turmas.
    x-displayName: Subjects
  - name: Posts
    description: Notícias e avaliações das turmas.
paths:
  /posts/news:
    get:
      tags:
        - Posts
      summary: Consultar notícias recentes das turmas atuais
      description: >-
        Até cinco notícias. updating indica atualização pendente; texto e anexos
        completos ficam no detalhe do post.
      operationId: get_latest_news_posts_news_get
      parameters:
        - name: Cache-Control
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              `no-cache`: revalidar; `max-age=N`: idade máxima em segundos;
              `stale-if-error[=N]`: aceitar cache na falha; `only-if-cached`:
              usar só cache (504 se ausente).
            title: Cache-Control
          description: >-
            `no-cache`: revalidar; `max-age=N`: idade máxima em segundos;
            `stale-if-error[=N]`: aceitar cache na falha; `only-if-cached`: usar
            só cache (504 se ausente).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestNewsFeed'
        '401':
          description: Credenciais ausentes ou inválidas.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: SIGAA indisponível.
components:
  schemas:
    LatestNewsFeed:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ClassroomNews'
          type: array
          title: Items
        updating:
          type: boolean
          title: Updating
      type: object
      required:
        - items
        - updating
      title: LatestNewsFeed
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClassroomNews:
      properties:
        classroom:
          $ref: '#/components/schemas/ParticipantClassroom'
        post:
          $ref: '#/components/schemas/ClassroomPost'
      type: object
      required:
        - classroom
        - post
      title: ClassroomNews
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ParticipantClassroom:
      properties:
        professors:
          items:
            $ref: '#/components/schemas/ProfessorRef'
          type: array
          title: Professors
          default: []
        vacancies:
          anyOf:
            - type: integer
            - type: 'null'
          title: Vacancies
          description: Vagas na última coleta, sem atualização em tempo real.
        occupied:
          anyOf:
            - type: integer
            - type: 'null'
          title: Occupied
          description: Ocupação na última coleta, sem atualização em tempo real.
        id:
          type: string
          title: Id
        sigaa_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sigaa Id
        number:
          type: string
          title: Number
        semester:
          type: string
          title: Semester
        schedule:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedule
        room:
          anyOf:
            - type: string
            - type: 'null'
          title: Room
        current:
          type: boolean
          title: Current
          default: false
        subject:
          $ref: '#/components/schemas/UserSubject'
        grade:
          anyOf:
            - $ref: '#/components/schemas/Grade'
            - type: 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/ClassroomStatus'
            - type: 'null'
      type: object
      required:
        - id
        - number
        - semester
        - subject
      title: ParticipantClassroom
      description: >-
        A turma com a menção do usuário, `None` enquanto não lançada ou
        sincronizada.
    ClassroomPost:
      properties:
        id:
          type: string
          title: Id
        type:
          $ref: '#/components/schemas/PostType'
        sigaa_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Sigaa Id
        classroom_sigaa_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Classroom Sigaa Id
        topic_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Id
        title:
          type: string
          title: Title
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        published_on:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Published On
        published_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Published At
        starts_on:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Starts On
        ends_on:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Ends On
        starts_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Starts At
        time_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Label
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        attachments:
          items:
            $ref: '#/components/schemas/NewsAttachment'
          type: array
          title: Attachments
          default: []
      type: object
      required:
        - id
        - type
        - title
      title: ClassroomPost
    ProfessorRef:
      properties:
        siape:
          anyOf:
            - type: integer
            - type: 'null'
          title: Siape
        name:
          type: string
          title: Name
        photo:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - siape
        - name
        - photo
        - email
      title: ProfessorRef
      description: Docente da turma; `siape` nulo fora do catálogo.
    UserSubject:
      properties:
        code:
          type: string
          title: Code
        name:
          type: string
          title: Name
        hours:
          anyOf:
            - type: integer
            - type: 'null'
          title: Hours
        unit:
          anyOf:
            - $ref: '#/components/schemas/UnitRef'
            - type: 'null'
      type: object
      required:
        - code
        - name
      title: UserSubject
      description: Matéria identificada pelo código.
    Grade:
      type: string
      enum:
        - SS
        - MS
        - MM
        - MI
        - II
        - SR
      title: Grade
    ClassroomStatus:
      type: string
      enum:
        - cursando
        - trancado
        - concluido
        - pending_enrollment
        - denied
      title: ClassroomStatus
    PostType:
      type: string
      enum:
        - news
        - topic
        - material
        - assessment
      title: PostType
    NewsAttachment:
      properties:
        name:
          type: string
          title: Name
        url:
          type: string
          title: Url
      type: object
      required:
        - name
        - url
      title: NewsAttachment
    UnitRef:
      properties:
        id:
          type: integer
          title: Id
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - code
        - name
      title: UnitRef
      description: 'Unidade acadêmica: `id` do SIGAA e sigla em `code`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.