Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 1.24 KB

SEQUENCE.md

File metadata and controls

76 lines (57 loc) · 1.24 KB

Sequence

Sequence diagrams that describe the patterns every client implements.

App start sequence

sequenceDiagram
    autonumber

    actor Client
    participant LoginService
    participant FeedsService
    participant EntriesService
    participant LastAccessService
    
    Client->>LoginService: POST /login
    LoginService-->>Client: Token

    Client->>FeedsService: GET /feeds
    FeedsService-->>Client: Feed[]
    par for each feed url
    Client->>EntriesService: GET /entries?url=[Feed.url]
    EntriesService-->>Client: Entry[]
    end

    Client->>LastAccessService: PUT /last-access
Loading

Upsert feed sequence

sequenceDiagram
    autonumber

    actor Client
    participant FeedsService
    
    Client->>FeedsService: PUT /feeds
    FeedsService-->>Client: Feed
Loading

Delete feed sequence

sequenceDiagram
    autonumber

    actor Client
    participant FeedsService
    
    Client->>FeedsService: DELETE /feeds
Loading

Type reference

interface Token {
  accessToken: string;
  tokenType: string;
  expiresIn: number;
}

interface Feed {
  name: string;
  url: string;
  hasNew?: boolean;
}

interface Entry {
  url?: string;
  title?: string;
  published?: string;
  isNew?: boolean;
}