-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
96 additions
and
118 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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
13 changes: 13 additions & 0 deletions
13
MailRuCloud/MailRuCloudApi/Base/Requests/WebBin/GetServerRequest.cs
This file contains 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,13 @@ | ||
using System.Net; | ||
|
||
namespace YaR.MailRuCloud.Api.Base.Requests.WebBin | ||
{ | ||
internal class GetServerRequest : ServerRequest | ||
{ | ||
public GetServerRequest(HttpCommonSettings settings) : base(settings) | ||
{ | ||
} | ||
|
||
protected override string RelationalUri => "https://dispatcher.cloud.mail.ru/d"; | ||
} | ||
} |
28 changes: 2 additions & 26 deletions
28
MailRuCloud/MailRuCloudApi/Base/Requests/WebBin/MobMetaServerRequest.cs
This file contains 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,37 +1,13 @@ | ||
using System; | ||
using System.Net; | ||
|
||
namespace YaR.MailRuCloud.Api.Base.Requests.WebBin | ||
{ | ||
internal class MobMetaServerRequest : BaseRequestString<MobMetaServerRequest.Result> | ||
internal class MobMetaServerRequest : ServerRequest | ||
{ | ||
public MobMetaServerRequest(HttpCommonSettings settings) : base(settings, null) | ||
public MobMetaServerRequest(HttpCommonSettings settings) : base(settings) | ||
{ | ||
} | ||
|
||
protected override string RelationalUri => "https://dispatcher.cloud.mail.ru/m"; | ||
|
||
protected override RequestResponse<Result> DeserializeMessage(string data) | ||
{ | ||
var datas = data.Split(new []{' '}, StringSplitOptions.RemoveEmptyEntries); | ||
var msg = new RequestResponse<Result> | ||
{ | ||
Ok = true, | ||
Result = new Result | ||
{ | ||
Url = datas[0], | ||
Ip = datas[1], | ||
Unknown = int.Parse(datas[2]) | ||
} | ||
}; | ||
return msg; | ||
} | ||
|
||
public class Result | ||
{ | ||
public string Url { get; set; } | ||
public string Ip { get; set; } | ||
public int Unknown { get; set; } | ||
} | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
...quests/WebBin/MobDownloadServerRequest.cs → ...Api/Base/Requests/WebBin/ServerRequest.cs
This file contains 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 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
10 changes: 10 additions & 0 deletions
10
MailRuCloud/MailRuCloudApi/Base/Requests/WebV2/CommonSettings.cs
This file contains 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,10 @@ | ||
namespace YaR.MailRuCloud.Api.Base.Requests.WebV2 | ||
{ | ||
internal static class CommonSettings | ||
{ | ||
public const string Domain = "mail.ru"; | ||
public const string AuthDomain = "https://auth.mail.ru"; | ||
|
||
public const string DefaultAcceptType = "text / html,application / xhtml + xml,application / xml; q = 0.9,*/*;q=0.8"; | ||
} | ||
} |
This file contains 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 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.