1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use ordiscan::{GetInscriptionInfoParams, GetListOfInscriptionParams, Ordiscan};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let api_key = String::from("<API-KEY-HERE>");
  let ordiclient = Ordiscan::new(api_key).unwrap();

  // get address acitivity
  let address_activity = ordiclient
    .get_address_activity("bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh")
    .await?;

  // get inscription info
  let inspection_info = ordiclient
    .get_inscription_info(GetInscriptionInfoParams {
      id: Some("b183b76a2635d1937a60e3eb12e868a64e5fff5e56819cb348cd442877bf95e7i0"),
      number: None,
    })
    .await?;

  // get list of inscription info
  let list_of_inscriptions = ordiclient
    .get_list_of_inscriptions(GetListOfInscriptionParams {
      address: Some("bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"),
      content_type: None,
      sort: None,
      after_number: None,
      before_number: None,
    })
    .await?;

  println!("{:#?}", address_activity);
  println!("{:#?}", inspection_info);
  println!("{:#?}", list_of_inscriptions);

  Ok(())
}