Struct discogs::discogs::Discogs
[−]
[src]
pub struct Discogs { /* fields omitted */ }
Methods
impl Discogs
[src]
pub fn new(user_agent: &str) -> Self
[src]
Constructs a new Client
with the provided user_agent
.
Examples
use discogs::Discogs; let client = Discogs::new("USER_AGENT");
pub fn key(&mut self, key: &str) -> &mut Self
[src]
Sets the discogs api client key
Examples
use discogs::Discogs; let mut client = Discogs::new("USER_AGENT"); client.key("CLIENT_KEY");
pub fn secret(&mut self, secret: &str) -> &mut Self
[src]
Sets the discogs api client secret
Examples
use discogs::Discogs; let mut client = Discogs::new("USER_AGENT"); client.secret("CLIENT_STRING");
pub fn artist(&mut self, id: u32) -> ArtistQueryBuilder
[src]
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);
pub fn label(&mut self, id: u32) -> LabelQueryBuilder
[src]
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);
pub fn release(&mut self, id: u32) -> ReleaseQueryBuilder
[src]
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);
pub fn master(&mut self, id: u32) -> MasterQueryBuilder
[src]
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);
pub fn search(&mut self) -> SearchQueryBuilder
[src]
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();