mironal / TwitterAPIKit

Swift library for the Twitter API v1 and v2 🍷
MIT License
118 stars 23 forks source link

Add .all static properties to Expansions and Fields #130

Closed mironal closed 1 year ago

mironal commented 1 year ago

close #129

Example

    func example() async {
        let response = await client.v2.tweet.getTweet(.init(
            id: "210462857140252672",
            expansions: TwitterTweetExpansionsV2.all,
            mediaFields: TwitterMediaFieldsV2.all,
            placeFields: TwitterPlaceFieldsV2.all,
            pollFields: TwitterPollFieldsV2.all,
            tweetFields: TwitterTweetFieldsV2.all.subtracting([.promotedMetrics]), // You can delete unwanted items from all of them.
            userFields: TwitterUserFieldsV2.all
            )
        )
            .responseObject

        print(response.prettyString)

    }
codecov-commenter commented 1 year ago

Codecov Report

Merging #130 (26a98ef) into main (89308a3) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #130      +/-   ##
==========================================
+ Coverage   80.32%   80.33%   +0.01%     
==========================================
  Files         255      255              
  Lines        6805     6809       +4     
==========================================
+ Hits         5466     5470       +4     
  Misses       1339     1339              
Impacted Files Coverage Δ
Sources/TwitterAPIKit/APIv2/ExpansionsV2.swift 100.00% <100.00%> (ø)
Sources/TwitterAPIKit/APIv2/FieldsV2.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 89308a3...26a98ef. Read the comment docs.