This repository was archived by the owner on Mar 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Added support for manga list and anime/manga list entry update #8
Open
naps250
wants to merge
9
commits into
LHCGreg:master
Choose a base branch
from
naps250:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9384192
Added support for user's manga list.
naps250 d597505
Reverted the namespace change but still kept the folders.
naps250 2b0323e
Using directives removal revert.
naps250 5b90a8f
Addressed almost all of your comments.
naps250 065ffc8
Added some tests.
naps250 73d1373
Replaced System.Xml.Serialization with System.Xml.Linq for XML genera…
naps250 fbafe15
Missed to remove the comments.
naps250 97c9dc1
Added integration test for anime and manga updates (all the values an…
naps250 4ac22f3
Updated XUnit packages because current version was no longer working …
naps250 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,5 @@ obj/ | |
| *.suo | ||
| *.pubxml | ||
| packages/*/ | ||
| MalApi/package/ | ||
| MalApi/package/ | ||
| .vs/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| using MalApi; | ||
| using System; | ||
| using System; | ||
|
|
||
| namespace MalApi.NetCoreExample | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 2 additions & 7 deletions
9
MalApi/CompletionStatus.cs → MalApi/Anime/AnimeCompletionStatus.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
MalApi/MalAnimeNotFoundException.cs → MalApi/Anime/MalAnimeNotFoundException.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
|
|
||
| namespace MalApi | ||
| { | ||
|
|
||
9 changes: 2 additions & 7 deletions
9
MalApi/MalSeriesStatus.cs → MalApi/Anime/MalAnimeSeriesStatus.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
MalApi/MyAnimeListEntry.cs → MalApi/Anime/MyAnimeListEntry.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| using System.Xml.Serialization; | ||
|
|
||
| namespace MalApi | ||
| { | ||
| [XmlRoot("entry")] | ||
| public class UpdateAnimeObject : UpdateObjectBase | ||
| { | ||
| [XmlElement("episode")] | ||
| public string Episode { get; set; } = null; | ||
|
|
||
| [XmlElement("status")] | ||
| public string Status { get; set; } = null; | ||
|
|
||
| [XmlElement("score")] | ||
| public string Score { get; set; } = null; | ||
|
|
||
| [XmlElement("storage_type")] | ||
| public string StorageType { get; set; } = null; | ||
|
|
||
| [XmlElement("storage_value")] | ||
| public string StorageValue { get; set; } = null; | ||
|
|
||
| [XmlElement("times_rewatched")] | ||
| public string TimesRewatched { get; set; } = null; | ||
|
|
||
| [XmlElement("rewatch_value")] | ||
| public string RewatchValue { get; set; } = null; | ||
|
|
||
| [XmlElement("date_start")] | ||
| public string DateStart { get; set; } = null; | ||
|
|
||
| [XmlElement("date_finish")] | ||
| public string DateFinish { get; set; } = null; | ||
|
|
||
| [XmlElement("priority")] | ||
| public string Priority { get; set; } = null; | ||
|
|
||
| [XmlElement("enable_discussion")] | ||
| public string EnableDiscussion { get; set; } = null; | ||
|
|
||
| [XmlElement("enable_rewatching")] | ||
| public string EnableRewatching { get; set; } = null; | ||
|
|
||
| [XmlElement("comments")] | ||
| public string Comments { get; set; } = null; | ||
|
|
||
| [XmlElement("tags")] | ||
| public string Tags { get; set; } = null; | ||
|
|
||
| private UpdateAnimeObject() | ||
| { | ||
| } | ||
|
|
||
| public UpdateAnimeObject(string episode = null, | ||
| string status = null, | ||
| string score = null, | ||
| string storageType = null, | ||
| string storageValue = null, | ||
| string timesRewatched = null, | ||
| string rewatchValue = null, | ||
| string dateStart = null, | ||
| string dateFinish = null, | ||
| string priority = null, | ||
| string enableDiscussion = null, | ||
| string enableRewatching = null, | ||
| string comments = null, | ||
| string tags = null) | ||
| { | ||
|
||
| Episode = episode; | ||
| Status = status; | ||
| Score = score; | ||
| StorageType = storageType; | ||
| StorageValue = storageValue; | ||
| TimesRewatched = timesRewatched; | ||
| RewatchValue = rewatchValue; | ||
| DateStart = dateStart; | ||
| DateFinish = dateFinish; | ||
| Priority = priority; | ||
| EnableDiscussion = enableDiscussion; | ||
| EnableRewatching = enableRewatching; | ||
| Comments = comments; | ||
| Tags = tags; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,4 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
|
|
||
| namespace MalApi | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Object" is kind of generic. "AnimeUpdate" would describe the purpose as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The properties in this class are all strings. The users of the library should be dealing with integers for episode count, AnimeCompletionStatus for status, etc, instead of expecting them to serialize those properties to strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean if a property is not set? Does it not get updated or does it get set to an empty value in MAL? This should be documented in a doc comment on the class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to link to the MAL documentation at https://myanimelist.net/modules.php?go=api#animevalues in a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with all your comments.