sys1yagi / mastodon4j

mastodon client for java, kotlin https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md
MIT License
135 stars 28 forks source link

added allargs constructor to entities. #53

Closed wakingrufus closed 7 years ago

wakingrufus commented 7 years ago

This allows them to be instantiated with values without json. This is useful for testing. It also makes it easier to switch them to "data" classes if the need ever arises.

Reason: I am trying to use this library in a project, and I can't create the entities to pass to my code for testing purposes.

codecov-io commented 7 years ago

Codecov Report

Merging #53 into master will decrease coverage by 3.15%. The diff coverage is 63%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
- Coverage     61.29%   58.13%   -3.16%     
  Complexity      147      147              
============================================
  Files            43       43              
  Lines           633      633              
  Branches         60       60              
============================================
- Hits            388      368      -20     
- Misses          231      251      +20     
  Partials         14       14
Impacted Files Coverage Δ Complexity Δ
...n/java/com/sys1yagi/mastodon4j/api/entity/Error.kt 0% <0%> (ø) 0 <0> (ø) :arrow_down:
...a/com/sys1yagi/mastodon4j/api/entity/Attachment.kt 100% <100%> (ø) 7 <7> (ø) :arrow_down:
...com/sys1yagi/mastodon4j/api/entity/Relationship.kt 100% <100%> (ø) 7 <7> (ø) :arrow_down:
...java/com/sys1yagi/mastodon4j/api/entity/Results.kt 100% <100%> (ø) 4 <4> (ø) :arrow_down:
...java/com/sys1yagi/mastodon4j/api/entity/Context.kt 100% <100%> (ø) 3 <3> (ø) :arrow_down:
...sys1yagi/mastodon4j/api/entity/auth/AccessToken.kt 100% <100%> (ø) 1 <1> (ø) :arrow_down:
...ava/com/sys1yagi/mastodon4j/api/entity/Instance.kt 100% <100%> (ø) 6 <6> (ø) :arrow_down:
.../java/com/sys1yagi/mastodon4j/api/entity/Report.kt 100% <100%> (ø) 3 <3> (ø) :arrow_down:
...in/java/com/sys1yagi/mastodon4j/api/entity/Card.kt 100% <100%> (ø) 5 <5> (ø) :arrow_down:
...java/com/sys1yagi/mastodon4j/api/entity/Mention.kt 20% <20%> (-60%) 1 <1> (ø)
... and 6 more

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 f9e87f5...2c14f54. Read the comment docs.

sys1yagi commented 7 years ago

thanks. LGTM

sys1yagi commented 7 years ago

v1.1.0 released 🎊

https://jitpack.io/#sys1yagi/mastodon4j/1.1.0 compile 'com.github.sys1yagi.mastodon4j:mastodon4j:1.1.0'