1use thiserror::Error;
2
3mod client;
4mod device;
5mod friendships;
6mod profile;
7mod users;
8
9pub use client::Client;
10pub use profile::Profile;
11
12#[cfg(test)]
13mod tests;
14
15const API_BASE_URL: &str = "https://i.instagram.com/api/v1";
16const INSTAGRAM_SIGN_KEY: &str = "99e16edcca71d7c1f3fd74d447f6281bd5253a623000a55ed0b60014467a53b1";
17
18#[derive(Error, Debug)]
19pub enum GoofyError {
20 #[error("Generic HTTP error")]
21 HttpError(#[from] reqwest::Error),
22 #[error("Generic IO error")]
23 IOError(#[from] std::io::Error),
24 #[error("JSON error")]
25 JSONError(#[from] serde_json::error::Error),
26 #[error("API login failed with status code {0}")]
27 LoginFailed(u16),
28 #[error("API request failed with status code {0}")]
29 ResponseNotSuccess(u16),
30}