congress-dot-gov - v0.4.3
    Preparing search index...

    Class TreatyClient

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    apiKey: string
    baseUrl: string
    endpoint: string

    Methods

    • Returns detailed information for a specified partitioned treaty.

      Parameters

      • congress: number

        The congress of the treaty

      • treatyNumber: string

        The treaty number

      • treatySuffix: string

        The treaty suffix

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Pagination parameters

      Returns Promise<
          {
              treaty: {
                  actions: { count: number; url: string };
                  congressConsidered: number;
                  congressReceived: number;
                  countriesParties: { name: string }[];
                  indexTerms: { name: string }[];
                  inForceDate: null;
                  number: number;
                  oldNumber: null;
                  oldNumberDisplayName: null;
                  parts: Record<string, any>;
                  relatedDocs: { citation: string; url: string }[];
                  resolutionText: string;
                  suffix: string;
                  titles: { title: string; titleType: string }[];
                  topic: string;
                  transmittedDate: string;
                  updateDate: string;
              };
          } & { rateLimit: RateLimitInfo },
      >

      Detailed information for the specified partitioned treaty

    • Returns the list of actions on a specified partitioned treaty.

      Parameters

      • congress: number

        The congress of the treaty

      • treatyNumber: string

        The treaty number

      • treatySuffix: string

        The treaty suffix

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Pagination parameters

      Returns Promise<
          {
              actions: {
                  actionCode: string;
                  actionDate: string;
                  committee: null
                  | { name: string; systemCode: string; url: string };
                  text: string;
                  type: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      The list of actions for the specified partitioned treaty

    • Returns a list of treaties sorted by date of last update.

      Parameters

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams & DateRangeParams} - Accepts pagination and date range parameters

      Returns Promise<
          {
              treaties: {
                  congressConsidered: null
                  | number;
                  congressReceived: number;
                  number: number;
                  parts: Record<string, any>;
                  suffix: string;
                  topic: null | string;
                  transmittedDate: null | string;
                  updateDate: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      A list of treaties

    • Returns a list of treaties for the specified congress, sorted by date of last update.

      Parameters

      • congress: number

        The congress to filter by

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams & DateRangeParams} - Accepts pagination and date range parameters

      Returns Promise<
          {
              treaties: {
                  congressConsidered: null
                  | number;
                  congressReceived: number;
                  number: number;
                  parts: Record<string, any>;
                  suffix: string;
                  topic: null | string;
                  transmittedDate: null | string;
                  updateDate: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      A list of treaties for the specified congress

    • Returns detailed information for a specified treaty.

      Parameters

      • congress: number

        The congress of the treaty

      • treatyNumber: string

        The treaty number

      • params: { format?: Format } = {}

        {BaseParams} - Accepts format parameters

      Returns Promise<
          {
              treaty: {
                  actions: { count: number; url: string };
                  congressConsidered: number;
                  congressReceived: number;
                  countriesParties: { name: string }[];
                  indexTerms: { name: string }[];
                  inForceDate: null;
                  number: number;
                  oldNumber: null;
                  oldNumberDisplayName: null;
                  parts: Record<string, any>;
                  relatedDocs: { citation: string; url: string }[];
                  resolutionText: string;
                  suffix: string;
                  titles: { title: string; titleType: string }[];
                  topic: string;
                  transmittedDate: string;
                  updateDate: string;
              };
          } & { rateLimit: RateLimitInfo },
      >

      Detailed information for the specified treaty

    • Returns the list of actions on a specified treaty.

      Parameters

      • congress: number

        The congress of the treaty

      • treatyNumber: string

        The treaty number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Pagination parameters

      Returns Promise<
          {
              actions: {
                  actionCode: string;
                  actionDate: string;
                  committee: null
                  | { name: string; systemCode: string; url: string };
                  text: string;
                  type: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      The list of actions for the specified treaty

    • Returns the list of committees associated with a specified treaty.

      Parameters

      • congress: number

        The congress of the treaty

      • treatyNumber: string

        The treaty number

      • params: { format?: Format; limit?: number; offset?: number } = {}

        {PaginationParams} - Pagination parameters

      Returns Promise<
          {
              treatyCommittees: {
                  activities: { date: string; name: string }[];
                  chamber: "Senate";
                  name: string;
                  subcommittees: {}[];
                  systemCode: string;
                  type: string;
                  url: string;
              }[];
          } & { rateLimit: RateLimitInfo },
      >

      The list of committees for the specified treaty