Struct discogs::discogs::Discogs
[−]
[src]
pub struct Discogs { /* fields omitted */ }
Methods
impl Discogs
[src]
fn new(user_agent: &str) -> Self
Constructs a new Client
with the provided user_agent
.
Examples
use discogs::Discogs; let client = Discogs::new("USER_AGENT");
fn key(&mut self, key: &str) -> &mut Self
Sets the discogs api client key
Examples
use discogs::Discogs; let mut client = Discogs::new("USER_AGENT"); client.key("CLIENT_KEY");
fn secret(&mut self, secret: &str) -> &mut Self
Sets the discogs api client secret
Examples
use discogs::Discogs; let mut client = Discogs::new("USER_AGENT"); client.secret("CLIENT_STRING");
fn artist(&mut self, id: u32) -> ArtistQueryBuilder
Returns an instance of the ArtistQueryBuilder
structure for the specified id
This allows you to pass parameters to build a request.
Examples
use discogs::Discogs; let artist = Discogs::new("USER_AGENT") .artist(4567);
fn label(&mut self, id: u32) -> LabelQueryBuilder
Returns an instance of the LabelQueryBuilder
structure for the specified id
This allows you to pass parameters to build a request.
Examples
use discogs::Discogs; let label = Discogs::new("USER_AGENT") .label(1234);
fn release(&mut self, id: u32) -> ReleaseQueryBuilder
Returns an instance of the ReleaseQueryBuilder
structure for the specified id
This allows you to pass parameters to build a request.
Examples
use discogs::Discogs; let release = Discogs::new("USER_AGENT") .label(1234);
fn master(&mut self, id: u32) -> MasterQueryBuilder
Returns an instance of the MasterQueryBuilder
structure for the specified id
This allows you to pass parameters to build a request.
Examples
use discogs::Discogs; let master = Discogs::new("USER_AGENT") .master(1234);
fn search(&mut self) -> SearchQueryBuilder
Returns an instance of the SearchQueryBuilder
structure.
This allows you to pass parameters to build a request.
Examples
use discogs::Discogs; let search = Discogs::new("USER_AGENT").search();