pub struct Client { /* private fields */ }Expand description
The Tango API client. Cheap to clone — all state is behind an Arc.
Construct with Client::builder. Call .api_key(...) on the builder, or
set the TANGO_API_KEY environment variable and call Client::from_env.
Client is Send + Sync + Clone. Share one instance across tasks.
§Example
use tango::Client;
let client = Client::builder()
.api_key("your-api-key")
.build()?;
let _agency = client.get_agency("9700", None).await?;Implementations§
Source§impl Client
impl Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Start building a Client.
api_key is required (compile-time check via bon). Everything else
is optional with sensible defaults; see the individual setters.
§Errors
Returns Error::Build if the underlying reqwest::Client fails to
construct (rare; usually means a bad rustls/TLS configuration).
Source§impl Client
impl Client
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Construct a client from TANGO_API_KEY and (optionally) TANGO_BASE_URL
in the environment, with all other settings at their defaults.
§Errors
Returns Error::Build if the underlying HTTP client fails to construct.
Sourcepub fn rate_limit_info(&self) -> Option<RateLimitInfo>
pub fn rate_limit_info(&self) -> Option<RateLimitInfo>
A snapshot of the rate-limit headers from the most recent response, or
None if no request has completed yet.
Sourcepub fn last_response_headers(&self) -> Option<HeaderMap>
pub fn last_response_headers(&self) -> Option<HeaderMap>
The full response headers from the most recent completed request, or
None if no request has completed yet. Useful for inspecting
X-Request-Id, X-Tango-Trace-Id, etc.
Source§impl Client
impl Client
Sourcepub async fn list_agencies(
&self,
opts: ListAgenciesOptions,
) -> Result<Page<Record>>
pub async fn list_agencies( &self, opts: ListAgenciesOptions, ) -> Result<Page<Record>>
GET /api/agencies/ — list federal agencies.
Sourcepub async fn get_agency(
&self,
code: &str,
opts: Option<GetAgencyOptions>,
) -> Result<AgencyRecord>
pub async fn get_agency( &self, code: &str, opts: Option<GetAgencyOptions>, ) -> Result<AgencyRecord>
GET /api/agencies/{code}/ — fetch a single agency.
code is typically a CGAC code (e.g. "9700" for the Department of
Defense). Returns a typed AgencyRecord; forward-compatible server
fields land in AgencyRecord::extra.
Sourcepub async fn list_agency_awarding_contracts(
&self,
code: &str,
opts: AgencyContractsOptions,
) -> Result<Page<Record>>
pub async fn list_agency_awarding_contracts( &self, code: &str, opts: AgencyContractsOptions, ) -> Result<Page<Record>>
GET /api/agencies/{code}/contracts/awarding/ — contracts where this
agency is the awarding agency.
Sourcepub async fn list_agency_funding_contracts(
&self,
code: &str,
opts: AgencyContractsOptions,
) -> Result<Page<Record>>
pub async fn list_agency_funding_contracts( &self, code: &str, opts: AgencyContractsOptions, ) -> Result<Page<Record>>
GET /api/agencies/{code}/contracts/funding/ — contracts where this
agency is the funding agency.
Sourcepub fn iterate_agency_awarding_contracts(
&self,
code: &str,
opts: AgencyContractsOptions,
) -> PageStream<Record>
pub fn iterate_agency_awarding_contracts( &self, code: &str, opts: AgencyContractsOptions, ) -> PageStream<Record>
Stream every contract where code is the awarding agency.
Sourcepub fn iterate_agency_funding_contracts(
&self,
code: &str,
opts: AgencyContractsOptions,
) -> PageStream<Record>
pub fn iterate_agency_funding_contracts( &self, code: &str, opts: AgencyContractsOptions, ) -> PageStream<Record>
Stream every contract where code is the funding agency.
Source§impl Client
impl Client
Sourcepub async fn list_budget_accounts(
&self,
opts: ListBudgetAccountsOptions,
) -> Result<Page<Record>>
pub async fn list_budget_accounts( &self, opts: ListBudgetAccountsOptions, ) -> Result<Page<Record>>
GET /api/budget/accounts/ — one page of budget-account rollups.
Sourcepub fn iterate_budget_accounts(
&self,
opts: ListBudgetAccountsOptions,
) -> PageStream<Record>
pub fn iterate_budget_accounts( &self, opts: ListBudgetAccountsOptions, ) -> PageStream<Record>
Stream every budget-account rollup matching opts.
Sourcepub async fn get_budget_account(
&self,
id: &str,
opts: Option<ListOptions>,
) -> Result<Record>
pub async fn get_budget_account( &self, id: &str, opts: Option<ListOptions>, ) -> Result<Record>
GET /api/budget/accounts/{id}/ — a single budget-account rollup by its numeric id (from a list row’s id field).
Sourcepub async fn get_budget_account_quarters(
&self,
id: &str,
opts: Option<BudgetAccountQuartersOptions>,
) -> Result<Page<Record>>
pub async fn get_budget_account_quarters( &self, id: &str, opts: Option<BudgetAccountQuartersOptions>, ) -> Result<Page<Record>>
GET /api/budget/accounts/{id}/quarters/ — one row per (TAS, quarter) of obligation and outlay flow for a single account-year.
Coverage starts at FY2021; earlier years return an empty page.
The envelope also carries federal_account_symbol and fiscal_year, which Page does not surface.
Sourcepub async fn get_budget_account_recipients(
&self,
id: &str,
opts: Option<BudgetAccountRecipientsOptions>,
) -> Result<Page<Record>>
pub async fn get_budget_account_recipients( &self, id: &str, opts: Option<BudgetAccountRecipientsOptions>, ) -> Result<Page<Record>>
GET /api/budget/accounts/{id}/recipients/ — funding-office x recipient contract flows for a single account-year, largest contract_obligated first.
Contract flows only. Each row carries the resolved funding_office and recipient, plus a capped contracts list; a row that hits the cap sets contracts_truncated.
The envelope also carries federal_account_symbol and fiscal_year, which Page does not surface.
Source§impl Client
impl Client
Sourcepub async fn list_contract_appeals(
&self,
opts: ListContractAppealsOptions,
) -> Result<Page<Record>>
pub async fn list_contract_appeals( &self, opts: ListContractAppealsOptions, ) -> Result<Page<Record>>
GET /api/contract_appeals/ — one page of board-of-contract-appeals decisions.
Sourcepub async fn get_contract_appeal(
&self,
uuid: &str,
opts: Option<GetContractAppealOptions>,
) -> Result<ContractAppealRecord>
pub async fn get_contract_appeal( &self, uuid: &str, opts: Option<GetContractAppealOptions>, ) -> Result<ContractAppealRecord>
GET /api/contract_appeals/{uuid}/ — fetch a single decision by UUID.
Returns a typed ContractAppealRecord; forward-compatible server fields land in
ContractAppealRecord::extra.
decision_text — the full text of the decision — needs an Enterprise plan, and below that its key is ABSENT rather than null.
So record.decision_text == None means “not served to this caller”, never “this decision has no text”; text_status and text_char_count answer that at every plan.
Sourcepub fn iterate_contract_appeals(
&self,
opts: ListContractAppealsOptions,
) -> PageStream<Record>
pub fn iterate_contract_appeals( &self, opts: ListContractAppealsOptions, ) -> PageStream<Record>
Stream every contract-appeal decision matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_contracts(
&self,
opts: ListContractsOptions,
) -> Result<Page<Record>>
pub async fn list_contracts( &self, opts: ListContractsOptions, ) -> Result<Page<Record>>
GET /api/contracts/ — one page of federal contract records.
Name obligations_by_fiscal_year(fiscal_year,obligated) in shape for the award’s obligations per federal fiscal year (Tango API 5.11.0), and decode it with FiscalYearObligation::from_record.
The same expand works on the IDV, OTA and OT IDV lists and every award get_*, but it is always null on IDVs and OT IDVs.
Sourcepub async fn get_contract(
&self,
key: &str,
opts: Option<ListOptions>,
) -> Result<Record>
pub async fn get_contract( &self, key: &str, opts: Option<ListOptions>, ) -> Result<Record>
GET /api/contracts/{key}/ — a single federal contract record.
Sourcepub async fn list_contract_subawards(
&self,
key: &str,
opts: Option<EntitySubresourceOptions>,
) -> Result<Page<Record>>
pub async fn list_contract_subawards( &self, key: &str, opts: Option<EntitySubresourceOptions>, ) -> Result<Page<Record>>
GET /api/contracts/{key}/subawards/ — subawards reported against a
single prime contract.
Sourcepub async fn list_contract_transactions(
&self,
key: &str,
opts: Option<EntitySubresourceOptions>,
) -> Result<Page<Record>>
pub async fn list_contract_transactions( &self, key: &str, opts: Option<EntitySubresourceOptions>, ) -> Result<Page<Record>>
GET /api/contracts/{key}/transactions/ — raw transaction history
backing a single contract.
Sourcepub fn iterate_contracts(
&self,
opts: ListContractsOptions,
) -> PageStream<Record>
pub fn iterate_contracts( &self, opts: ListContractsOptions, ) -> PageStream<Record>
Stream every federal contract record matching opts. The stream follows
?cursor= (or ?page= fallback) on the server’s next URL.
let mut s = client.iterate_contracts(
ListContractsOptions::builder().awarding_agency("9700").build(),
);
while let Some(record) = s.try_next().await? {
let _ = record;
}Source§impl Client
impl Client
Sourcepub async fn list_dibbs_rfqs(
&self,
opts: ListDibbsRfqsOptions,
) -> Result<Page<Record>>
pub async fn list_dibbs_rfqs( &self, opts: ListDibbsRfqsOptions, ) -> Result<Page<Record>>
GET /api/dibbs/rfqs/ — one page of DIBBS request-for-quote line records.
Sourcepub async fn get_dibbs_rfq(
&self,
uuid: &str,
opts: Option<GetDibbsOptions>,
) -> Result<Record>
pub async fn get_dibbs_rfq( &self, uuid: &str, opts: Option<GetDibbsOptions>, ) -> Result<Record>
GET /api/dibbs/rfqs/{uuid}/ — a single DIBBS request-for-quote line.
Sourcepub fn iterate_dibbs_rfqs(
&self,
opts: ListDibbsRfqsOptions,
) -> PageStream<Record>
pub fn iterate_dibbs_rfqs( &self, opts: ListDibbsRfqsOptions, ) -> PageStream<Record>
Stream every DIBBS request-for-quote line matching opts.
Sourcepub async fn list_dibbs_rfps(
&self,
opts: ListDibbsRfpsOptions,
) -> Result<Page<Record>>
pub async fn list_dibbs_rfps( &self, opts: ListDibbsRfpsOptions, ) -> Result<Page<Record>>
GET /api/dibbs/rfps/ — one page of DIBBS request-for-proposal records.
Sourcepub async fn get_dibbs_rfp(
&self,
uuid: &str,
opts: Option<GetDibbsOptions>,
) -> Result<Record>
pub async fn get_dibbs_rfp( &self, uuid: &str, opts: Option<GetDibbsOptions>, ) -> Result<Record>
GET /api/dibbs/rfps/{uuid}/ — a single DIBBS request-for-proposal.
Sourcepub fn iterate_dibbs_rfps(
&self,
opts: ListDibbsRfpsOptions,
) -> PageStream<Record>
pub fn iterate_dibbs_rfps( &self, opts: ListDibbsRfpsOptions, ) -> PageStream<Record>
Stream every DIBBS request-for-proposal matching opts.
Sourcepub async fn list_dibbs_awards(
&self,
opts: ListDibbsAwardsOptions,
) -> Result<Page<Record>>
pub async fn list_dibbs_awards( &self, opts: ListDibbsAwardsOptions, ) -> Result<Page<Record>>
GET /api/dibbs/awards/ — one page of DIBBS award line item records.
Sourcepub async fn get_dibbs_award(
&self,
uuid: &str,
opts: Option<GetDibbsOptions>,
) -> Result<Record>
pub async fn get_dibbs_award( &self, uuid: &str, opts: Option<GetDibbsOptions>, ) -> Result<Record>
GET /api/dibbs/awards/{uuid}/ — a single DIBBS award line item.
Sourcepub fn iterate_dibbs_awards(
&self,
opts: ListDibbsAwardsOptions,
) -> PageStream<Record>
pub fn iterate_dibbs_awards( &self, opts: ListDibbsAwardsOptions, ) -> PageStream<Record>
Stream every DIBBS award line item matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_ebuy_requests(
&self,
opts: ListEbuyRequestsOptions,
) -> Result<Page<Record>>
pub async fn list_ebuy_requests( &self, opts: ListEbuyRequestsOptions, ) -> Result<Page<Record>>
GET /api/ebuy/requests/ — one page of the eBuy requests visible to your account.
Requires the Pro plan (below it the API returns 403). With no linked schedule contract the page is empty rather than an error; call get_ebuy_access to tell the two apart.
Sourcepub async fn get_ebuy_request(
&self,
rfq_id: &str,
opts: Option<GetEbuyRequestOptions>,
) -> Result<Record>
pub async fn get_ebuy_request( &self, rfq_id: &str, opts: Option<GetEbuyRequestOptions>, ) -> Result<Record>
GET /api/ebuy/requests/{rfq_id}/ — one eBuy request.
The default shape carries every field plus organization(*) and attachments(*). An attachment with is_link = true is an outbound URL in doc_path with no stored document behind it.
A request outside your scope returns Error::NotFound, the same as an unknown id.
Neither the default shape nor attachments(*) carries a document’s text; name the attachments(extracted_text) leaf to read it (Tango API 5.9.1 and later):
rfq_id,attachments(doc_seq_num,doc_name,extracted_text)The extracted_text key is absent rather than null on an attachment with no text (a link, an empty scan, or a document not yet extracted), so read it with get instead of indexing.
Sourcepub async fn get_ebuy_attachment_url(
&self,
rfq_id: &str,
doc_seq_num: u32,
) -> Result<String>
pub async fn get_ebuy_attachment_url( &self, rfq_id: &str, doc_seq_num: u32, ) -> Result<String>
GET /api/ebuy/requests/{rfq_id}/attachments/{doc_seq_num}/download/ — a short-lived download URL for one stored attachment.
The API answers with a redirect to a presigned URL valid for about five minutes. This method does not follow it: it returns the redirect target, so fetch it promptly and without your API key.
Errors: Error::ExternalLink (carrying the link’s url) when the attachment is an outbound link rather than a stored document, and Error::NotFound when the request is outside your scope or the document has not been captured yet.
Sourcepub async fn get_ebuy_access(&self) -> Result<EbuyAccess>
pub async fn get_ebuy_access(&self) -> Result<EbuyAccess>
GET /api/ebuy/access/ — whether your account can read eBuy requests, and why not when it can’t.
Sourcepub fn iterate_ebuy_requests(
&self,
opts: ListEbuyRequestsOptions,
) -> PageStream<Record>
pub fn iterate_ebuy_requests( &self, opts: ListEbuyRequestsOptions, ) -> PageStream<Record>
Stream every eBuy request matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_entities(
&self,
opts: ListEntitiesOptions,
) -> Result<Page<Record>>
pub async fn list_entities( &self, opts: ListEntitiesOptions, ) -> Result<Page<Record>>
GET /api/entities/ — one page of entity records.
Sourcepub async fn get_entity(
&self,
uei: &str,
opts: Option<GetEntityOptions>,
) -> Result<Record>
pub async fn get_entity( &self, uei: &str, opts: Option<GetEntityOptions>, ) -> Result<Record>
GET /api/entities/{uei}/ — fetch a single entity by UEI or CAGE code.
Sourcepub fn iterate_entities(&self, opts: ListEntitiesOptions) -> PageStream<Record>
pub fn iterate_entities(&self, opts: ListEntitiesOptions) -> PageStream<Record>
Stream every entity record matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_entity_contracts(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_entity_contracts( &self, uei: &str, opts: EntitySubresourceOptions, ) -> Result<Page<Record>>
GET /api/entities/{uei}/contracts/ — contracts awarded to this entity.
Sourcepub fn iterate_entity_contracts(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> PageStream<Record>
pub fn iterate_entity_contracts( &self, uei: &str, opts: EntitySubresourceOptions, ) -> PageStream<Record>
Stream every contract awarded to uei.
Sourcepub async fn list_entity_idvs(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_entity_idvs( &self, uei: &str, opts: EntitySubresourceOptions, ) -> Result<Page<Record>>
GET /api/entities/{uei}/idvs/ — IDVs held by this entity.
Sourcepub fn iterate_entity_idvs(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> PageStream<Record>
pub fn iterate_entity_idvs( &self, uei: &str, opts: EntitySubresourceOptions, ) -> PageStream<Record>
Stream every IDV held by uei.
Sourcepub async fn list_entity_otas(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_entity_otas( &self, uei: &str, opts: EntitySubresourceOptions, ) -> Result<Page<Record>>
GET /api/entities/{uei}/otas/ — Other Transaction Awards held by this
entity.
Sourcepub fn iterate_entity_otas(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> PageStream<Record>
pub fn iterate_entity_otas( &self, uei: &str, opts: EntitySubresourceOptions, ) -> PageStream<Record>
Stream every OTA held by uei.
Sourcepub async fn list_entity_otidvs(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_entity_otidvs( &self, uei: &str, opts: EntitySubresourceOptions, ) -> Result<Page<Record>>
GET /api/entities/{uei}/otidvs/ — Other Transaction IDVs held by this
entity.
Sourcepub fn iterate_entity_otidvs(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> PageStream<Record>
pub fn iterate_entity_otidvs( &self, uei: &str, opts: EntitySubresourceOptions, ) -> PageStream<Record>
Stream every OTIDV held by uei.
Sourcepub async fn list_entity_subawards(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_entity_subawards( &self, uei: &str, opts: EntitySubresourceOptions, ) -> Result<Page<Record>>
GET /api/entities/{uei}/subawards/ — subawards reported against
contracts held by this entity.
Sourcepub fn iterate_entity_subawards(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> PageStream<Record>
pub fn iterate_entity_subawards( &self, uei: &str, opts: EntitySubresourceOptions, ) -> PageStream<Record>
Stream every subaward reported under uei.
Sourcepub async fn list_entity_lcats(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_entity_lcats( &self, uei: &str, opts: EntitySubresourceOptions, ) -> Result<Page<Record>>
GET /api/entities/{uei}/lcats/ — Labor Categories advertised by this
entity.
Sourcepub fn iterate_entity_lcats(
&self,
uei: &str,
opts: EntitySubresourceOptions,
) -> PageStream<Record>
pub fn iterate_entity_lcats( &self, uei: &str, opts: EntitySubresourceOptions, ) -> PageStream<Record>
Stream every LCAT advertised by uei.
Sourcepub async fn get_entity_budget_flows(
&self,
uei: &str,
opts: Option<EntityBudgetFlowsOptions>,
) -> Result<Page<Record>>
pub async fn get_entity_budget_flows( &self, uei: &str, opts: Option<EntityBudgetFlowsOptions>, ) -> Result<Page<Record>>
GET /api/entities/{uei}/budget-flows/ — the federal accounts that paid this entity, largest contract_obligated first, each with its budget-account context.
Contract flows only: grant and assistance flows are not in this index.
Sourcepub async fn get_entity_metrics(
&self,
uei: &str,
months: u32,
period_grouping: &str,
) -> Result<Record>
pub async fn get_entity_metrics( &self, uei: &str, months: u32, period_grouping: &str, ) -> Result<Record>
GET /api/entities/{uei}/metrics/{months}/{period_grouping}/ — rolling
windowed metrics for this entity. Mirrors the signature of the sibling
SDKs (Node / Python / Go).
months is the rolling-window length (must be > 0). period_grouping
is typically "month" or "quarter".
Source§impl Client
impl Client
Sourcepub async fn list_exclusions(
&self,
opts: ListExclusionsOptions,
) -> Result<Page<Record>>
pub async fn list_exclusions( &self, opts: ListExclusionsOptions, ) -> Result<Page<Record>>
GET /api/exclusions/ — one page of exclusion records.
Sourcepub async fn get_exclusion(
&self,
exclusion_key: &str,
opts: Option<GetExclusionOptions>,
) -> Result<Record>
pub async fn get_exclusion( &self, exclusion_key: &str, opts: Option<GetExclusionOptions>, ) -> Result<Record>
GET /api/exclusions/{exclusion_key}/ — a single exclusion.
Sourcepub fn iterate_exclusions(
&self,
opts: ListExclusionsOptions,
) -> PageStream<Record>
pub fn iterate_exclusions( &self, opts: ListExclusionsOptions, ) -> PageStream<Record>
Stream every exclusion matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_federal_register_documents(
&self,
opts: ListFederalRegisterDocumentsOptions,
) -> Result<Page<Record>>
pub async fn list_federal_register_documents( &self, opts: ListFederalRegisterDocumentsOptions, ) -> Result<Page<Record>>
GET /api/federal_register/ — one page of Federal Register documents, newest publication first by default.
Sourcepub async fn get_federal_register_document(
&self,
document_uuid: &str,
opts: Option<GetFederalRegisterDocumentOptions>,
) -> Result<Record>
pub async fn get_federal_register_document( &self, document_uuid: &str, opts: Option<GetFederalRegisterDocumentOptions>, ) -> Result<Record>
GET /api/federal_register/{uuid}/ — one Federal Register document by its uuid.
The route takes the uuid, not the document_number, which is not unique on its own; find a document by number with list_federal_register_documents and ListFederalRegisterDocumentsOptions::document_number.
full_text is returned only when named in shape.
Sourcepub fn iterate_federal_register_documents(
&self,
opts: ListFederalRegisterDocumentsOptions,
) -> PageStream<Record>
pub fn iterate_federal_register_documents( &self, opts: ListFederalRegisterDocumentsOptions, ) -> PageStream<Record>
Stream every Federal Register document matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_gsa_elibrary_contracts(
&self,
opts: ListGsaElibraryContractsOptions,
) -> Result<Page<Record>>
pub async fn list_gsa_elibrary_contracts( &self, opts: ListGsaElibraryContractsOptions, ) -> Result<Page<Record>>
GET /api/gsa_elibrary_contracts/ — one page of GSA eLibrary contracts.
Sourcepub async fn get_gsa_elibrary_contract(
&self,
uuid: &str,
opts: Option<GetGsaElibraryContractOptions>,
) -> Result<Record>
pub async fn get_gsa_elibrary_contract( &self, uuid: &str, opts: Option<GetGsaElibraryContractOptions>, ) -> Result<Record>
GET /api/gsa_elibrary_contracts/{uuid}/ — fetch a single GSA eLibrary
contract by UUID.
Sourcepub fn iterate_gsa_elibrary_contracts(
&self,
opts: ListGsaElibraryContractsOptions,
) -> PageStream<Record>
pub fn iterate_gsa_elibrary_contracts( &self, opts: ListGsaElibraryContractsOptions, ) -> PageStream<Record>
Stream every GSA eLibrary contract matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_idv_awards(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_idv_awards( &self, key: &str, opts: IdvSubresourceOptions, ) -> Result<Page<Record>>
GET /api/idvs/{key}/awards/ — task-order awards under a parent IDV.
Sourcepub fn iterate_idv_awards(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> PageStream<Record>
pub fn iterate_idv_awards( &self, key: &str, opts: IdvSubresourceOptions, ) -> PageStream<Record>
Stream every task-order award under key.
Sourcepub async fn list_idv_child_idvs(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_idv_child_idvs( &self, key: &str, opts: IdvSubresourceOptions, ) -> Result<Page<Record>>
GET /api/idvs/{key}/idvs/ — child IDVs nested under a parent IDV.
Sourcepub fn iterate_idv_child_idvs(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> PageStream<Record>
pub fn iterate_idv_child_idvs( &self, key: &str, opts: IdvSubresourceOptions, ) -> PageStream<Record>
Stream every child IDV under key.
Sourcepub async fn list_idv_transactions(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_idv_transactions( &self, key: &str, opts: IdvSubresourceOptions, ) -> Result<Page<Record>>
GET /api/idvs/{key}/transactions/ — raw transaction history backing
an IDV.
Sourcepub fn iterate_idv_transactions(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> PageStream<Record>
pub fn iterate_idv_transactions( &self, key: &str, opts: IdvSubresourceOptions, ) -> PageStream<Record>
Stream every transaction backing key.
Sourcepub async fn list_idv_lcats(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> Result<Page<Record>>
pub async fn list_idv_lcats( &self, key: &str, opts: IdvSubresourceOptions, ) -> Result<Page<Record>>
GET /api/idvs/{key}/lcats/ — Labor Categories (LCATs) under an IDV.
Sourcepub fn iterate_idv_lcats(
&self,
key: &str,
opts: IdvSubresourceOptions,
) -> PageStream<Record>
pub fn iterate_idv_lcats( &self, key: &str, opts: IdvSubresourceOptions, ) -> PageStream<Record>
Stream every LCAT under key.
Source§impl Client
impl Client
Sourcepub async fn list_idvs(&self, opts: ListIDVsOptions) -> Result<Page<Record>>
pub async fn list_idvs(&self, opts: ListIDVsOptions) -> Result<Page<Record>>
GET /api/idvs/ — one page of Indefinite Delivery Vehicle records.
Sourcepub async fn get_idv(
&self,
key: &str,
opts: Option<GetIDVOptions>,
) -> Result<Record>
pub async fn get_idv( &self, key: &str, opts: Option<GetIDVOptions>, ) -> Result<Record>
GET /api/idvs/{key}/ — fetch a single IDV by key.
Returns a free-form Record; deserialize into your own struct via
serde_json::from_value(Value::Object(record)) if you need typed fields.
Sourcepub fn iterate_idvs(&self, opts: ListIDVsOptions) -> PageStream<Record>
pub fn iterate_idvs(&self, opts: ListIDVsOptions) -> PageStream<Record>
Stream every IDV record matching opts. The stream follows ?cursor=
(or ?page= fallback) on the server’s next URL.
Source§impl Client
impl Client
Sourcepub async fn list_itdashboard(
&self,
opts: ListItdashboardOptions,
) -> Result<Page<Record>>
pub async fn list_itdashboard( &self, opts: ListItdashboardOptions, ) -> Result<Page<Record>>
GET /api/itdashboard/ — one page of federal IT investments.
Sourcepub async fn get_itdashboard(
&self,
uii: &str,
opts: Option<GetItdashboardOptions>,
) -> Result<Record>
pub async fn get_itdashboard( &self, uii: &str, opts: Option<GetItdashboardOptions>, ) -> Result<Record>
GET /api/itdashboard/{uii}/ — fetch a single investment
by Unique Investment Identifier (UII).
Sourcepub fn iterate_itdashboard(
&self,
opts: ListItdashboardOptions,
) -> PageStream<Record>
pub fn iterate_itdashboard( &self, opts: ListItdashboardOptions, ) -> PageStream<Record>
Stream every IT Dashboard investment matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_lcats(&self, opts: ListLcatsOptions) -> Result<Page<Record>>
pub async fn list_lcats(&self, opts: ListLcatsOptions) -> Result<Page<Record>>
Dispatcher: list LCATs for the owner specified by opts.uei or
opts.idv_key.
- When
ueiis set: delegates toClient::list_entity_lcats(GET /api/entities/{uei}/lcats/). - Else when
idv_keyis set: delegates toClient::list_idv_lcats(GET /api/idvs/{key}/lcats/). - Else: returns
Error::Validation.
When both are set, uei wins (mirrors the Go SDK).
Sourcepub fn iterate_lcats(&self, opts: ListLcatsOptions) -> PageStream<Record>
pub fn iterate_lcats(&self, opts: ListLcatsOptions) -> PageStream<Record>
Stream every LCAT for the owner specified by opts. Same dispatch
rules as Client::list_lcats; the validation error surfaces on
the first poll.
Source§impl Client
impl Client
Sourcepub async fn list_organizations(
&self,
opts: ListOrganizationsOptions,
) -> Result<Page<Record>>
pub async fn list_organizations( &self, opts: ListOrganizationsOptions, ) -> Result<Page<Record>>
GET /api/organizations/ — one page of organization records.
Sourcepub fn iterate_organizations(
&self,
opts: ListOrganizationsOptions,
) -> PageStream<Record>
pub fn iterate_organizations( &self, opts: ListOrganizationsOptions, ) -> PageStream<Record>
Stream every organization record matching opts.
Sourcepub async fn get_organization(&self, key: &str) -> Result<Record>
pub async fn get_organization(&self, key: &str) -> Result<Record>
GET /api/organizations/{key}/ — fetch a single organization.
Sourcepub async fn list_naics(&self, opts: ListNaicsOptions) -> Result<Page<Record>>
pub async fn list_naics(&self, opts: ListNaicsOptions) -> Result<Page<Record>>
GET /api/naics/ — one page of NAICS records.
Sourcepub fn iterate_naics(&self, opts: ListNaicsOptions) -> PageStream<Record>
pub fn iterate_naics(&self, opts: ListNaicsOptions) -> PageStream<Record>
Stream every NAICS record matching opts.
Sourcepub async fn get_naics(&self, code: &str) -> Result<Record>
pub async fn get_naics(&self, code: &str) -> Result<Record>
GET /api/naics/{code}/ — fetch a single NAICS record.
Sourcepub async fn list_psc(&self, opts: ListPscOptions) -> Result<Page<Record>>
pub async fn list_psc(&self, opts: ListPscOptions) -> Result<Page<Record>>
GET /api/psc/ — one page of PSC (Product/Service Code) records.
Sourcepub fn iterate_psc(&self, opts: ListPscOptions) -> PageStream<Record>
pub fn iterate_psc(&self, opts: ListPscOptions) -> PageStream<Record>
Stream every PSC record matching opts.
Sourcepub async fn get_psc(&self, code: &str) -> Result<Record>
pub async fn get_psc(&self, code: &str) -> Result<Record>
GET /api/psc/{code}/ — fetch a single PSC record.
Sourcepub async fn list_mas_sins(
&self,
opts: ListMasSinsOptions,
) -> Result<Page<Record>>
pub async fn list_mas_sins( &self, opts: ListMasSinsOptions, ) -> Result<Page<Record>>
GET /api/mas_sins/ — one page of GSA MAS Special Item Number records.
Sourcepub fn iterate_mas_sins(&self, opts: ListMasSinsOptions) -> PageStream<Record>
pub fn iterate_mas_sins(&self, opts: ListMasSinsOptions) -> PageStream<Record>
Stream every MAS SIN record matching opts.
Sourcepub async fn get_mas_sin(&self, sin: &str) -> Result<Record>
pub async fn get_mas_sin(&self, sin: &str) -> Result<Record>
GET /api/mas_sins/{sin}/ — fetch a single MAS SIN record.
Sourcepub async fn list_assistance_listings(
&self,
opts: ListAssistanceListingsOptions,
) -> Result<Page<Record>>
pub async fn list_assistance_listings( &self, opts: ListAssistanceListingsOptions, ) -> Result<Page<Record>>
GET /api/assistance_listings/ — one page of CFDA program records.
Sourcepub fn iterate_assistance_listings(
&self,
opts: ListAssistanceListingsOptions,
) -> PageStream<Record>
pub fn iterate_assistance_listings( &self, opts: ListAssistanceListingsOptions, ) -> PageStream<Record>
Stream every Assistance Listing record matching opts.
Sourcepub async fn get_assistance_listing(&self, number: &str) -> Result<Record>
pub async fn get_assistance_listing(&self, number: &str) -> Result<Record>
GET /api/assistance_listings/{number}/ — fetch a single Assistance
Listing (CFDA program) by its CFDA number (e.g. "10.001").
Sourcepub async fn list_business_types(
&self,
opts: ListBusinessTypesOptions,
) -> Result<Page<Record>>
pub async fn list_business_types( &self, opts: ListBusinessTypesOptions, ) -> Result<Page<Record>>
GET /api/business_types/ — one page of business-type reference
records (SBA / SAM.gov socioeconomic designations).
Sourcepub fn iterate_business_types(
&self,
opts: ListBusinessTypesOptions,
) -> PageStream<Record>
pub fn iterate_business_types( &self, opts: ListBusinessTypesOptions, ) -> PageStream<Record>
Stream every business-type record matching opts.
Sourcepub async fn get_business_type(&self, code: &str) -> Result<Record>
pub async fn get_business_type(&self, code: &str) -> Result<Record>
GET /api/business_types/{code}/ — fetch a single business-type
reference record by its short code.
Sourcepub async fn list_offices(
&self,
opts: ListOfficesOptions,
) -> Result<Page<Record>>
pub async fn list_offices( &self, opts: ListOfficesOptions, ) -> Result<Page<Record>>
GET /api/offices/ — one page of federal contracting office records.
Sourcepub fn iterate_offices(&self, opts: ListOfficesOptions) -> PageStream<Record>
pub fn iterate_offices(&self, opts: ListOfficesOptions) -> PageStream<Record>
Stream every office record matching opts.
Sourcepub async fn get_office(&self, code: &str) -> Result<Record>
pub async fn get_office(&self, code: &str) -> Result<Record>
GET /api/offices/{code}/ — fetch a single office record by its
FPDS-NG office code.
Sourcepub async fn list_departments(
&self,
opts: ListDepartmentsOptions,
) -> Result<Page<Record>>
pub async fn list_departments( &self, opts: ListDepartmentsOptions, ) -> Result<Page<Record>>
GET /api/departments/ — one page of department records.
Prefer Client::list_organizations with level = "1" for new code.
The standalone /api/departments/ endpoint is retained for backward
compatibility.
Sourcepub fn iterate_departments(
&self,
opts: ListDepartmentsOptions,
) -> PageStream<Record>
pub fn iterate_departments( &self, opts: ListDepartmentsOptions, ) -> PageStream<Record>
Stream every department record matching opts.
Sourcepub async fn get_department(&self, code: &str) -> Result<Record>
pub async fn get_department(&self, code: &str) -> Result<Record>
GET /api/departments/{code}/ — fetch a single department by code (e.g. "97" for DoD).
The API’s department code is an integer, so the returned record carries it as a JSON number (97), not a string.
An agency’s nested department.code is the same integer, while the agency’s own code is a string ("9700").
Source§impl Client
impl Client
Sourcepub async fn get_version(&self) -> Result<Record>
pub async fn get_version(&self) -> Result<Record>
GET /api/version/ — return the API server’s version metadata
(build commit, deployed-at, etc.).
Single-value endpoint: the server returns a JSON object, not a
paginated envelope, so this returns a Record directly.
Sourcepub async fn list_api_keys(&self, opts: ListApiKeysOptions) -> Result<Record>
pub async fn list_api_keys(&self, opts: ListApiKeysOptions) -> Result<Record>
Source§impl Client
impl Client
Sourcepub async fn get_naics_metrics(
&self,
code: &str,
months: u32,
period_grouping: &str,
) -> Result<Record>
pub async fn get_naics_metrics( &self, code: &str, months: u32, period_grouping: &str, ) -> Result<Record>
GET /api/naics/{code}/metrics/{months}/{period_grouping}/
Rolling-window metrics keyed by NAICS code.
Sourcepub async fn get_psc_metrics(
&self,
code: &str,
months: u32,
period_grouping: &str,
) -> Result<Record>
pub async fn get_psc_metrics( &self, code: &str, months: u32, period_grouping: &str, ) -> Result<Record>
GET /api/psc/{code}/metrics/{months}/{period_grouping}/
Rolling-window metrics keyed by PSC code.
Sourcepub async fn list_metrics(&self, opts: ListMetricsOptions) -> Result<Record>
pub async fn list_metrics(&self, opts: ListMetricsOptions) -> Result<Record>
Convenience dispatcher: route to NAICS / PSC / entity metrics based
on ListMetricsOptions::owner_type.
Returns Error::Validation when:
owner_idis empty,months == 0,period_groupingis empty, orowner_typeisn’t one of the three known discriminants.
The entity flavour fetches /api/entities/{uei}/metrics/{months}/{period_grouping}/
directly here; once Wave A’s entity_subresources lands the typed
Client::get_entity_metrics helper, this dispatcher will collapse to
delegate to it (no public-surface change).
Source§impl Client
impl Client
Sourcepub async fn list_opportunities(
&self,
opts: ListOpportunitiesOptions,
) -> Result<Page<Record>>
pub async fn list_opportunities( &self, opts: ListOpportunitiesOptions, ) -> Result<Page<Record>>
GET /api/opportunities/ — one page of opportunity records.
The shape leaves documented on get_opportunity (award fields, attachment counts, attachments(extraction_status)) are accepted on the list too.
Sourcepub fn iterate_opportunities(
&self,
opts: ListOpportunitiesOptions,
) -> PageStream<Record>
pub fn iterate_opportunities( &self, opts: ListOpportunitiesOptions, ) -> PageStream<Record>
Stream every opportunity matching opts.
Sourcepub async fn list_notices(
&self,
opts: ListNoticesOptions,
) -> Result<Page<Record>>
pub async fn list_notices( &self, opts: ListNoticesOptions, ) -> Result<Page<Record>>
GET /api/notices/ — one page of notice records.
The shape leaves documented on get_notice are accepted on the list too.
Sourcepub fn iterate_notices(&self, opts: ListNoticesOptions) -> PageStream<Record>
pub fn iterate_notices(&self, opts: ListNoticesOptions) -> PageStream<Record>
Stream every notice matching opts.
Sourcepub async fn list_forecasts(
&self,
opts: ListForecastsOptions,
) -> Result<Page<Record>>
pub async fn list_forecasts( &self, opts: ListForecastsOptions, ) -> Result<Page<Record>>
GET /api/forecasts/ — one page of forecast records.
Sourcepub fn iterate_forecasts(
&self,
opts: ListForecastsOptions,
) -> PageStream<Record>
pub fn iterate_forecasts( &self, opts: ListForecastsOptions, ) -> PageStream<Record>
Stream every forecast matching opts.
Sourcepub async fn list_grants(&self, opts: ListGrantsOptions) -> Result<Page<Record>>
pub async fn list_grants(&self, opts: ListGrantsOptions) -> Result<Page<Record>>
GET /api/grants/ — one page of grant records.
Sourcepub fn iterate_grants(&self, opts: ListGrantsOptions) -> PageStream<Record>
pub fn iterate_grants(&self, opts: ListGrantsOptions) -> PageStream<Record>
Stream every grant matching opts.
Sourcepub async fn get_opportunity(
&self,
opportunity_id: &str,
opts: Option<ListOptions>,
) -> Result<Record>
pub async fn get_opportunity( &self, opportunity_id: &str, opts: Option<ListOptions>, ) -> Result<Record>
GET /api/opportunities/{opportunity_id}/ — a single opportunity.
None of the fields below is in the SDK’s default shape, so name the ones you want.
Award fields (Tango API 5.5.0): awarded, award_date, award_amount, awardee, awardee_uei, award_count, solicitation_opportunity_id and the awards(opportunity_id,notice_id,award_number,award_date,award_amount,awardee,awardee_uei) expand.
award_date, award_amount, awardee and awardee_uei are filled only where SAM.gov posted an award notice, and award_amount is the text SAM.gov published, not a number.
When an award is posted as its own opportunity and references its solicitation, the award’s solicitation_opportunity_id points back to the solicitation, whose awards(...) lists up to ten of the most recent linked awards; award_count is the full count.
awarded is true when the opportunity has an award of its own or has linked awards.
Attachment counts (Tango API 5.9.0): meta(attachments_count,files_count,links_count).
A file is a document attached to the notice (only files have extracted text) and a link is a URL the notice lists; meta.attachments_count still counts every attachment, so files plus links need not equal it.
files_count and links_count are null until the record has been counted: treat null as unknown, not zero.
attachments(extraction_status) (Tango API 5.11.0) reports pending, extracting, completed, failed or unsupported for each attachment, which says why extracted_text is missing. It is available on every plan and returned only when named; attachments(*) does not carry it.
opportunity_id,title,awarded,award_count,awards(notice_id,award_date,awardee_uei),meta(files_count,links_count),attachments(name,extraction_status)Sourcepub async fn get_notice(
&self,
notice_id: &str,
opts: Option<ListOptions>,
) -> Result<Record>
pub async fn get_notice( &self, notice_id: &str, opts: Option<ListOptions>, ) -> Result<Record>
GET /api/notices/{notice_id}/ — a single notice.
None of the fields below is in the SDK’s default shape, so name the ones you want.
- Award fields (Tango API 5.5.0):
award_date,award_amount,awardeeandawardee_uei, filled only where the notice posted an award. - Attachment counts (Tango API 5.9.0):
file_countandlink_countbesideattachment_count, which still counts every attachment, links included. The new counts are null until the record has been counted: treat null as unknown, not zero. attachments(extraction_status)(Tango API 5.11.0):pending,extracting,completed,failedorunsupportedper attachment, on every plan, returned only when named.
Sourcepub async fn get_forecast(
&self,
id: &str,
opts: Option<ListOptions>,
) -> Result<Record>
pub async fn get_forecast( &self, id: &str, opts: Option<ListOptions>, ) -> Result<Record>
GET /api/forecasts/{id}/ — a single procurement forecast.
Source§impl Client
impl Client
Sourcepub async fn list_otas(&self, opts: ListOTAsOptions) -> Result<Page<Record>>
pub async fn list_otas(&self, opts: ListOTAsOptions) -> Result<Page<Record>>
GET /api/otas/ — one page of Other Transaction Authority award actions.
Sourcepub async fn get_ota(
&self,
key: &str,
opts: Option<GetOTAOptions>,
) -> Result<Record>
pub async fn get_ota( &self, key: &str, opts: Option<GetOTAOptions>, ) -> Result<Record>
GET /api/otas/{key}/ — fetch a single OTA by key.
Sourcepub fn iterate_otas(&self, opts: ListOTAsOptions) -> PageStream<Record>
pub fn iterate_otas(&self, opts: ListOTAsOptions) -> PageStream<Record>
Stream every OTA matching opts.
Sourcepub async fn list_otidvs(&self, opts: ListOTIDVsOptions) -> Result<Page<Record>>
pub async fn list_otidvs(&self, opts: ListOTIDVsOptions) -> Result<Page<Record>>
GET /api/otidvs/ — one page of Other Transaction IDV parent records.
Sourcepub async fn get_otidv(
&self,
key: &str,
opts: Option<GetOTIDVOptions>,
) -> Result<Record>
pub async fn get_otidv( &self, key: &str, opts: Option<GetOTIDVOptions>, ) -> Result<Record>
GET /api/otidvs/{key}/ — fetch a single OTIDV by key.
Sourcepub fn iterate_otidvs(&self, opts: ListOTIDVsOptions) -> PageStream<Record>
pub fn iterate_otidvs(&self, opts: ListOTIDVsOptions) -> PageStream<Record>
Stream every OTIDV matching opts.
Sourcepub async fn list_otidv_awards(
&self,
key: &str,
opts: ListOTIDVAwardsOptions,
) -> Result<Page<Record>>
pub async fn list_otidv_awards( &self, key: &str, opts: ListOTIDVAwardsOptions, ) -> Result<Page<Record>>
GET /api/otidvs/{key}/awards/ — child awards under an OTIDV parent.
Sourcepub fn iterate_otidv_awards(
&self,
key: &str,
opts: ListOTIDVAwardsOptions,
) -> PageStream<Record>
pub fn iterate_otidv_awards( &self, key: &str, opts: ListOTIDVAwardsOptions, ) -> PageStream<Record>
Stream every child award under the given OTIDV parent.
Source§impl Client
impl Client
Sourcepub async fn list_protests(
&self,
opts: ListProtestsOptions,
) -> Result<Page<Record>>
pub async fn list_protests( &self, opts: ListProtestsOptions, ) -> Result<Page<Record>>
GET /api/protests/ — one page of bid-protest records.
Sourcepub async fn get_protest(
&self,
case_id: &str,
opts: Option<GetProtestOptions>,
) -> Result<ProtestRecord>
pub async fn get_protest( &self, case_id: &str, opts: Option<GetProtestOptions>, ) -> Result<ProtestRecord>
GET /api/protests/{case_id}/ — fetch a single protest by case ID.
Returns a typed ProtestRecord; forward-compatible server fields land
in ProtestRecord::extra.
Sourcepub fn iterate_protests(&self, opts: ListProtestsOptions) -> PageStream<Record>
pub fn iterate_protests(&self, opts: ListProtestsOptions) -> PageStream<Record>
Stream every protest matching opts.
Source§impl Client
impl Client
Sourcepub async fn resolve(&self, input: ResolveInput) -> Result<ResolveResult>
pub async fn resolve(&self, input: ResolveInput) -> Result<ResolveResult>
POST /api/resolve/ — fuzzy-match a name to entity or organization
candidates.
input.target_type is an enum and is therefore always valid;
input.name must be non-empty (validated client-side).
Sourcepub async fn validate(&self, input: ValidateInput) -> Result<ValidateResult>
pub async fn validate(&self, input: ValidateInput) -> Result<ValidateResult>
POST /api/validate/ — check whether an identifier (PIID, solicitation,
or UEI) is well-formed and known.
Source§impl Client
impl Client
Sourcepub async fn list_sbir_topics(
&self,
opts: ListSbirTopicsOptions,
) -> Result<Page<Record>>
pub async fn list_sbir_topics( &self, opts: ListSbirTopicsOptions, ) -> Result<Page<Record>>
GET /api/sbir/topics/ — one page of SBIR/STTR topic records.
Sourcepub async fn get_sbir_topic(
&self,
topic_id: &str,
opts: Option<GetSbirOptions>,
) -> Result<Record>
pub async fn get_sbir_topic( &self, topic_id: &str, opts: Option<GetSbirOptions>, ) -> Result<Record>
GET /api/sbir/topics/{topic_id}/ — a single SBIR/STTR topic.
Sourcepub fn iterate_sbir_topics(
&self,
opts: ListSbirTopicsOptions,
) -> PageStream<Record>
pub fn iterate_sbir_topics( &self, opts: ListSbirTopicsOptions, ) -> PageStream<Record>
Stream every SBIR/STTR topic matching opts.
Sourcepub async fn list_sbir_solicitations(
&self,
opts: ListSbirSolicitationsOptions,
) -> Result<Page<Record>>
pub async fn list_sbir_solicitations( &self, opts: ListSbirSolicitationsOptions, ) -> Result<Page<Record>>
GET /api/sbir/solicitations/ — one page of DoD DSIP solicitation cycle records.
Sourcepub async fn get_sbir_solicitation(
&self,
solicitation_id: &str,
opts: Option<GetSbirOptions>,
) -> Result<Record>
pub async fn get_sbir_solicitation( &self, solicitation_id: &str, opts: Option<GetSbirOptions>, ) -> Result<Record>
GET /api/sbir/solicitations/{solicitation_id}/ — a single DoD DSIP solicitation cycle.
Sourcepub fn iterate_sbir_solicitations(
&self,
opts: ListSbirSolicitationsOptions,
) -> PageStream<Record>
pub fn iterate_sbir_solicitations( &self, opts: ListSbirSolicitationsOptions, ) -> PageStream<Record>
Stream every DoD DSIP solicitation cycle matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_sled_opportunities(
&self,
opts: ListSledOpportunitiesOptions,
) -> Result<Page<Record>>
pub async fn list_sled_opportunities( &self, opts: ListSledOpportunitiesOptions, ) -> Result<Page<Record>>
GET /api/sled/opportunities/ — one page of state, local and education
solicitations.
Leaving both status and active unset returns open solicitations only.
That default is the API’s, and this method deliberately does not
synthesize one: sending status=open here would make active = false
unreachable, since it is the complement of open rather than an
independent value.
Sourcepub async fn get_sled_opportunity(
&self,
opportunity_id: &str,
opts: Option<GetSledOptions>,
) -> Result<Record>
pub async fn get_sled_opportunity( &self, opportunity_id: &str, opts: Option<GetSledOptions>, ) -> Result<Record>
GET /api/sled/opportunities/{opportunity_id}/ — one solicitation,
whatever its status. The open-only default applies to the list endpoint,
not here.
A document’s body is available as the attachments(extracted_text) leaf
on a Small plan or above, from API version 4.25.1. It must be NAMED — no
suggested shape includes it and attachments(*) does not carry it — and
its key is ABSENT rather than null whenever the text is not being served:
below Small (where it is withheld and named in meta.upgrade_hints), on a
contested document, or where it could not be resolved. A contested
document never returns text at any plan, because its stored bytes
disagree with what the record advertised.
Searching document text and reading it are separate: search matches
inside attachment text on every plan and returns no fragment of it.
Sourcepub async fn list_sled_opportunity_revisions(
&self,
opportunity_id: &str,
opts: ListSledOpportunityRevisionsOptions,
) -> Result<Page<Record>>
pub async fn list_sled_opportunity_revisions( &self, opportunity_id: &str, opts: ListSledOpportunityRevisionsOptions, ) -> Result<Page<Record>>
GET /api/sled/opportunities/{opportunity_id}/revisions/ — one
solicitation’s observed revision history.
observed_at is the scrape that saw the change, not the date the agency
made it: no state portal emits amendment notices, so kind is Tango’s
inference from the diff on about 95% of revisions, resolution is that
state’s crawl cadence, and history starts when Tango began reading the
jurisdiction rather than when the solicitation was posted.
Unlike the revisions(*) expand, this route serves enrichment rows —
Tango’s own detail fetch filling in coverage rather than an agency
amendment. Pass kind = "enrichment" for only those. The per-field
before/after (changes) requires a Small plan; changed_fields names
what moved at every plan.
Sourcepub async fn get_sled_coverage(&self) -> Result<Record>
pub async fn get_sled_coverage(&self) -> Result<Record>
GET /api/sled/opportunities/coverage/ — the per-state coverage rollup.
Returns corpus totals plus one row per jurisdiction: the total, the count in each of the five statuses, the jurisdiction levels present, and when a solicitation there last changed. It answers one question — whether a thin result for a state is a thin market or a portal Tango does not read.
Every state row carries all five status buckets whether or not they have rows, so a total and two buckets never invite subtraction. Takes no parameters and is neither shaped nor paginated.
Sourcepub async fn list_sled_forecasts(
&self,
opts: ListSledForecastsOptions,
) -> Result<Page<Record>>
pub async fn list_sled_forecasts( &self, opts: ListSledForecastsOptions, ) -> Result<Page<Record>>
GET /api/sled/forecasts/ — one page of planned state procurements.
Sourcepub async fn get_sled_forecast(
&self,
forecast_id: &str,
opts: Option<GetSledOptions>,
) -> Result<Record>
pub async fn get_sled_forecast( &self, forecast_id: &str, opts: Option<GetSledOptions>, ) -> Result<Record>
GET /api/sled/forecasts/{forecast_id}/ — one forecast.
Sourcepub fn iterate_sled_opportunities(
&self,
opts: ListSledOpportunitiesOptions,
) -> PageStream<Record>
pub fn iterate_sled_opportunities( &self, opts: ListSledOpportunitiesOptions, ) -> PageStream<Record>
Stream every SLED solicitation matching opts.
Sourcepub fn iterate_sled_forecasts(
&self,
opts: ListSledForecastsOptions,
) -> PageStream<Record>
pub fn iterate_sled_forecasts( &self, opts: ListSledForecastsOptions, ) -> PageStream<Record>
Stream every SLED forecast matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_subawards(
&self,
opts: ListSubawardsOptions,
) -> Result<Page<Record>>
pub async fn list_subawards( &self, opts: ListSubawardsOptions, ) -> Result<Page<Record>>
GET /api/subawards/ — one page of subaward records.
Sourcepub async fn get_subaward(
&self,
key: &str,
opts: Option<ListOptions>,
) -> Result<Record>
pub async fn get_subaward( &self, key: &str, opts: Option<ListOptions>, ) -> Result<Record>
GET /api/subawards/{key}/ — a single subaward record.
Sourcepub fn iterate_subawards(
&self,
opts: ListSubawardsOptions,
) -> PageStream<Record>
pub fn iterate_subawards( &self, opts: ListSubawardsOptions, ) -> PageStream<Record>
Stream every subaward matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_vehicle_awardees(
&self,
uuid: &str,
opts: ListVehicleAwardeesOptions,
) -> Result<Page<Record>>
pub async fn list_vehicle_awardees( &self, uuid: &str, opts: ListVehicleAwardeesOptions, ) -> Result<Page<Record>>
GET /api/vehicles/{uuid}/awardees/ — entities holding child IDVs
under this contracting vehicle.
Sourcepub async fn list_vehicle_orders(
&self,
uuid: &str,
opts: ListVehicleOrdersOptions,
) -> Result<Page<Record>>
pub async fn list_vehicle_orders( &self, uuid: &str, opts: ListVehicleOrdersOptions, ) -> Result<Page<Record>>
GET /api/vehicles/{uuid}/orders/ — task orders placed under this
vehicle’s child IDVs.
Sourcepub fn iterate_vehicle_awardees(
&self,
uuid: &str,
opts: ListVehicleAwardeesOptions,
) -> PageStream<Record>
pub fn iterate_vehicle_awardees( &self, uuid: &str, opts: ListVehicleAwardeesOptions, ) -> PageStream<Record>
Stream every awardee under this contracting vehicle.
Sourcepub fn iterate_vehicle_orders(
&self,
uuid: &str,
opts: ListVehicleOrdersOptions,
) -> PageStream<Record>
pub fn iterate_vehicle_orders( &self, uuid: &str, opts: ListVehicleOrdersOptions, ) -> PageStream<Record>
Stream every task order placed under this contracting vehicle.
Source§impl Client
impl Client
Sourcepub async fn list_vehicles(
&self,
opts: ListVehiclesOptions,
) -> Result<Page<Record>>
pub async fn list_vehicles( &self, opts: ListVehiclesOptions, ) -> Result<Page<Record>>
GET /api/vehicles/ — one page of contracting-vehicle records.
Sourcepub async fn get_vehicle(
&self,
uuid: &str,
opts: Option<GetVehicleOptions>,
) -> Result<Record>
pub async fn get_vehicle( &self, uuid: &str, opts: Option<GetVehicleOptions>, ) -> Result<Record>
GET /api/vehicles/{uuid}/ — fetch a single contracting vehicle.
The embedded solicitation accepts the opportunity attachment counts (Tango API 5.9.0): opportunity(meta(files_count,links_count)). Both are null until counted, so treat null as unknown, not zero.
Sourcepub fn iterate_vehicles(&self, opts: ListVehiclesOptions) -> PageStream<Record>
pub fn iterate_vehicles(&self, opts: ListVehiclesOptions) -> PageStream<Record>
Stream every contracting-vehicle record matching opts.
Source§impl Client
impl Client
Sourcepub async fn list_webhook_event_types(
&self,
) -> Result<WebhookEventTypesResponse>
pub async fn list_webhook_event_types( &self, ) -> Result<WebhookEventTypesResponse>
GET /api/webhooks/event-types/ — list the event types the server can emit.
Sourcepub async fn list_webhook_endpoints(
&self,
opts: ListOptions,
) -> Result<Page<WebhookEndpoint>>
pub async fn list_webhook_endpoints( &self, opts: ListOptions, ) -> Result<Page<WebhookEndpoint>>
GET /api/webhooks/endpoints/ — list the caller’s configured webhook
endpoints. Pagination only — no resource-specific filters.
Sourcepub async fn get_webhook_endpoint(&self, id: &str) -> Result<WebhookEndpoint>
pub async fn get_webhook_endpoint(&self, id: &str) -> Result<WebhookEndpoint>
GET /api/webhooks/endpoints/{id}/ — fetch a single endpoint.
Sourcepub async fn create_webhook_endpoint(
&self,
input: WebhookEndpointCreateInput,
) -> Result<WebhookEndpoint>
pub async fn create_webhook_endpoint( &self, input: WebhookEndpointCreateInput, ) -> Result<WebhookEndpoint>
POST /api/webhooks/endpoints/ — create a new endpoint.
name and callback_url are required. The Tango API enforces
unique(user, name) on endpoints, so the SDK validates client-side
for a cleaner error than the server’s 400 on duplicates.
Sourcepub async fn update_webhook_endpoint(
&self,
id: &str,
input: WebhookEndpointUpdateInput,
) -> Result<WebhookEndpoint>
pub async fn update_webhook_endpoint( &self, id: &str, input: WebhookEndpointUpdateInput, ) -> Result<WebhookEndpoint>
PATCH /api/webhooks/endpoints/{id}/ — update an existing endpoint.
Only Some fields on the input are sent.
Sourcepub async fn delete_webhook_endpoint(&self, id: &str) -> Result<()>
pub async fn delete_webhook_endpoint(&self, id: &str) -> Result<()>
DELETE /api/webhooks/endpoints/{id}/ — remove an endpoint.
Sourcepub async fn test_webhook_endpoint(
&self,
endpoint_id: &str,
) -> Result<WebhookTestDeliveryResult>
pub async fn test_webhook_endpoint( &self, endpoint_id: &str, ) -> Result<WebhookTestDeliveryResult>
POST /api/webhooks/endpoints/test-delivery/ — trigger a test delivery
for endpoint_id. The request body uses the canonical key endpoint
(per tango#2252); the server still accepts the legacy endpoint_id
alias but the SDK sends the canonical key.
Sourcepub async fn get_webhook_sample_payload(
&self,
event_type: Option<&str>,
) -> Result<WebhookSamplePayloadResponse>
pub async fn get_webhook_sample_payload( &self, event_type: Option<&str>, ) -> Result<WebhookSamplePayloadResponse>
GET /api/webhooks/endpoints/sample-payload/ — fetch a sample delivery
body. When event_type is Some, returns the single-event-type variant;
when None, the server returns samples for every event type.
Sourcepub async fn list_webhook_alerts(
&self,
opts: ListOptions,
) -> Result<Page<WebhookAlert>>
pub async fn list_webhook_alerts( &self, opts: ListOptions, ) -> Result<Page<WebhookAlert>>
GET /api/webhooks/alerts/ — list the caller’s filter-based subscriptions.
Sourcepub async fn get_webhook_alert(&self, id: &str) -> Result<WebhookAlert>
pub async fn get_webhook_alert(&self, id: &str) -> Result<WebhookAlert>
GET /api/webhooks/alerts/{id}/ — fetch a single alert.
Sourcepub async fn create_webhook_alert(
&self,
input: WebhookAlertCreateInput,
) -> Result<WebhookAlert>
pub async fn create_webhook_alert( &self, input: WebhookAlertCreateInput, ) -> Result<WebhookAlert>
POST /api/webhooks/alerts/ — create a filter-based subscription.
name, query_type (singular), and a non-empty filters object are
required. For accounts with multiple webhook endpoints, set
input.endpoint to the destination endpoint UUID; single-endpoint
accounts may omit it.
Sourcepub async fn update_webhook_alert(
&self,
id: &str,
input: WebhookAlertUpdateInput,
) -> Result<WebhookAlert>
pub async fn update_webhook_alert( &self, id: &str, input: WebhookAlertUpdateInput, ) -> Result<WebhookAlert>
PATCH /api/webhooks/alerts/{id}/ — update an existing alert.
Only name, frequency, cron_expression, and is_active are writable.
Sourcepub async fn delete_webhook_alert(&self, id: &str) -> Result<()>
pub async fn delete_webhook_alert(&self, id: &str) -> Result<()>
DELETE /api/webhooks/alerts/{id}/ — remove an alert.