Skip to content

Commit

Permalink
fix: fixed for the issue (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
myConsciousness committed Dec 15, 2022
1 parent 934f60d commit 7273ffe
Show file tree
Hide file tree
Showing 113 changed files with 1,654 additions and 203 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@
- `POST /api/v1/announcements/:id/dismiss`
- `PUT /api/v1/announcements/:id/reactions/:name`
- `DELETE /api/v1/announcements/:id/reactions/:name`
- Supported `accounts API methods`. ([#7](https://github.com/mastodon-dart/mastodon-api/issues/7))
- `POST /api/v1/accounts`
- `GET /api/v1/accounts/verify_credentials`
- `PATCH /api/v1/accounts/update_credentials`
- `GET /api/v1/accounts/:id`
- `GET /api/v1/accounts/:id/statuses`
- `GET /api/v1/accounts/:id/followers`
- `GET /api/v1/accounts/:id/following`
- `GET /api/v1/accounts/:id/featured_tags`
- `GET /api/v1/accounts/:id/lists`
- `POST /api/v1/accounts/:id/follow`
- `POST /api/v1/accounts/:id/unfollow`
- `POST /api/v1/accounts/:id/remove_from_followers`
- `POST /api/v1/accounts/:id/block`
- `POST /api/v1/accounts/:id/unblock`
- `POST /api/v1/accounts/:id/mute`
- `POST /api/v1/accounts/:id/unmute`
- `POST /api/v1/accounts/:id/pin`
- `POST /api/v1/accounts/:id/unpin`
- `POST /api/v1/accounts/:id/note`
- `GET /api/v1/accounts/relationships`
- `GET /api/v1/accounts/familiar_followers`
- `GET /api/v1/accounts/search`
- `GET /api/v1/accounts/lookup`

## v0.1.0

Expand Down
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ analyzer:
exclude:
- "**/*.freezed.dart"
- "**/*.g.dart"
- "test/**/*"
errors:
invalid_annotation_target: ignore

Expand Down
6 changes: 3 additions & 3 deletions lib/src/core/client/anonymous_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:convert';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart' as http;

// Project imports:
// 🌎 Project imports:
import 'client.dart';

class AnonymousClient extends Client {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/core/client/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:async';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart' as http;

abstract class Client {
Expand Down
6 changes: 3 additions & 3 deletions lib/src/core/client/client_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:async';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart' as http;
import 'package:universal_io/io.dart';

// Project imports:
// 🌎 Project imports:
import '../config/retry_config.dart';
import 'anonymous_client.dart';
import 'client.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/client/client_resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Project imports:
// 🌎 Project imports:
import '../exception/unauthorized_exception.dart';
import 'anonymous_client.dart';
import 'client.dart';
Expand Down
6 changes: 3 additions & 3 deletions lib/src/core/client/oauth2_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:convert';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart' as http;

// Project imports:
// 🌎 Project imports:
import 'client.dart';

class OAuth2Client extends Client {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/core/client/retry_policy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:math' as math;

// Project imports:
// 🌎 Project imports:
import '../config/retry_config.dart';
import 'retry_event.dart';
import 'retry_strategy.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/config/retry_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Project imports:
// 🌎 Project imports:
import '../client/retry_event.dart';
import '../client/retry_strategy.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/convert/duration_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

class DurationConverter implements JsonConverter<Duration, int> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/convert/int_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

class IntConverter implements JsonConverter<int, String> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/convert/int_date_time_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

class IntDateTimeConverter implements JsonConverter<DateTime, int> {
Expand Down
3 changes: 2 additions & 1 deletion lib/src/core/convert/scope_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

// 🌎 Project imports:
import '../scope.dart';

class ScopeConverter implements JsonConverter<List<Scope>, String> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/convert/unix_timestamp_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

class UnixTimestampConverter implements JsonConverter<DateTime, String> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/exception/data_not_found_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Project imports:
// 🌎 Project imports:
import 'mastodon_exception.dart';

/// This object is thrown to indicate that the data associated with
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/exception/mastodon_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart';

/// This exception indicates that an unexpected error occurred when
Expand Down
6 changes: 3 additions & 3 deletions lib/src/core/exception/mastodon_upload_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:io';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart';

// Project imports:
// 🌎 Project imports:
import 'mastodon_exception.dart';

/// This class indicates that an exception occurred during a file upload to
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/exception/rate_limit_exceeded_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Project imports:
// 🌎 Project imports:
import 'mastodon_exception.dart';

/// This exception indicates that the number of requests for a particular
Expand Down
4 changes: 2 additions & 2 deletions lib/src/core/exception/unauthorized_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart';

// Project imports:
// 🌎 Project imports:
import 'mastodon_exception.dart';

/// This exception is thrown to indicate that the specified access token was not
Expand Down
4 changes: 2 additions & 2 deletions lib/src/core/language.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

// Project imports:
// 🌎 Project imports:
import 'serializable.dart';

/// Represents ISO 639 Part 1 two-letter language code.
Expand Down
1 change: 1 addition & 0 deletions lib/src/core/locale.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// 🌎 Project imports:
import 'country.dart';
import 'language.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/src/core/mime_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

// 🌎 Project imports:
import 'serializable.dart';

enum MimeType implements Serializable {
Expand Down
6 changes: 3 additions & 3 deletions lib/src/core/service_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:convert' as converter;

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart' as http;

// Project imports:
// 🌎 Project imports:
import 'client/client_context.dart';
import 'client/stream_request.dart';
import 'client/stream_response.dart';
Expand Down
6 changes: 3 additions & 3 deletions lib/src/core/util/json_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:convert';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart';

// Project imports:
// 🌎 Project imports:
import '../exception/mastodon_exception.dart';

dynamic tryJsonDecode(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/visibility.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Project imports:
// 🌎 Project imports:
import 'serializable.dart';

/// Represents the visibility of specific status.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/mastodon_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Project imports:
// 🌎 Project imports:
import 'core/client/client_context.dart';
import 'core/config/retry_config.dart';
import 'service/mastodon_v1_service.dart';
Expand Down
6 changes: 3 additions & 3 deletions lib/src/service/base_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

// Dart imports:
// 🎯 Dart imports:
import 'dart:async';
import 'dart:convert';

// Package imports:
// 📦 Package imports:
import 'package:http/http.dart';

// Project imports:
// 🌎 Project imports:
import '../core/client/client_context.dart';
import '../core/client/stream_response.dart';
import '../core/client/user_context.dart';
Expand Down
4 changes: 2 additions & 2 deletions lib/src/service/entities/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

// ignore_for_file: invalid_annotation_target

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

// Project imports:
// 🌎 Project imports:
import 'emoji.dart';
import 'field.dart';

Expand Down
3 changes: 2 additions & 1 deletion lib/src/service/entities/announcement.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

// ignore_for_file: invalid_annotation_target

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

// 🌎 Project imports:
import 'announcement_account.dart';
import 'announcement_status.dart';
import 'emoji.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/service/entities/announcement_account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// ignore_for_file: invalid_annotation_target

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

part 'announcement_account.freezed.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/service/entities/announcement_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// ignore_for_file: invalid_annotation_target

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

part 'announcement_status.freezed.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/service/entities/application.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// ignore_for_file: invalid_annotation_target

// Package imports:
// 📦 Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';

part 'application.freezed.dart';
Expand Down
Loading

0 comments on commit 7273ffe

Please sign in to comment.