portfolio method

Request<UserPortfolioLink> portfolio(
  1. String username
)

Get a user’s portfolio link

Retrieve a single user’s portfolio link.

See: Unsplash docs

Implementation

Request<UserPortfolioLink> portfolio(String username) {
  final url = baseUrl.resolve('$username/portfolio');

  return Request(
    client: client,
    httpRequest: http.Request('GET', url),
    isPublicAction: true,
    bodyDeserializer: (dynamic json) =>
        UserPortfolioLink.fromJson(json as Map<String, dynamic>),
  );
}