Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TourDataManager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill
TourDataManager
Commits
fbf2e42b
Commit
fbf2e42b
authored
Oct 11, 2018
by
Kirill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetching estates
parent
6c89ad6c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
GetEstatesUseCase.cs
TourDataManager/GetEstatesUseCase.cs
+16
-0
TourDataManager.cs
TourDataManager/TourDataManager.cs
+6
-1
TourDataManager.csproj
TourDataManager/TourDataManager.csproj
+1
-0
Program.cs
TourDataManagerConsoleApplication/Program.cs
+4
-2
No files found.
TourDataManager/GetEstatesUseCase.cs
0 → 100644
View file @
fbf2e42b
using
System.Net.Http
;
using
Ninject
;
namespace
TourDataManager
{
public
class
GetEstatesUseCase
{
[
Inject
]
public
HttpClient
httpClient
{
get
;
set
;
}
public
async
void
GetEstates
(){
var
response
=
await
httpClient
.
GetAsync
(
"https://biganto.com/api-novus/estates.getList?client=desktopplayer&client_version=3.0&v=2.0"
);
var
content
=
await
response
.
Content
.
ReadAsStringAsync
();
Debug
.
Log
(
content
);
}
}
}
\ No newline at end of file
TourDataManager/TourDataManager.cs
View file @
fbf2e42b
...
@@ -22,6 +22,10 @@ namespace TourDataManager {
...
@@ -22,6 +22,10 @@ namespace TourDataManager {
cookiestor
.
Save
();
cookiestor
.
Save
();
});
});
}
}
public
void
GetEstates
(){
Container
.
Get
<
GetEstatesUseCase
>().
GetEstates
();
}
}
}
public
class
MyModule
:
NinjectModule
{
public
class
MyModule
:
NinjectModule
{
...
@@ -44,6 +48,7 @@ namespace TourDataManager {
...
@@ -44,6 +48,7 @@ namespace TourDataManager {
Bind
<
HttpClientHandler
>().
ToConstant
(
httpClientHandler
).
InSingletonScope
();
Bind
<
HttpClientHandler
>().
ToConstant
(
httpClientHandler
).
InSingletonScope
();
Bind
<
HttpClient
>().
ToConstant
(
httpClient
).
InSingletonScope
();
Bind
<
HttpClient
>().
ToConstant
(
httpClient
).
InSingletonScope
();
Bind
<
IAuthenticator
>().
To
<
Authenticator
>().
InSingletonScope
();
Bind
<
IAuthenticator
>().
To
<
Authenticator
>().
InSingletonScope
();
Bind
<
GetEstatesUseCase
>().
ToSelf
().
InSingletonScope
();
}
}
}
}
...
...
TourDataManager/TourDataManager.csproj
View file @
fbf2e42b
...
@@ -105,6 +105,7 @@
...
@@ -105,6 +105,7 @@
<Compile
Include=
"Debug.cs"
/>
<Compile
Include=
"Debug.cs"
/>
<Compile
Include=
"Entities\Estate.cs"
/>
<Compile
Include=
"Entities\Estate.cs"
/>
<Compile
Include=
"Entities\Tour.cs"
/>
<Compile
Include=
"Entities\Tour.cs"
/>
<Compile
Include=
"GetEstatesUseCase.cs"
/>
<Compile
Include=
"IAuthenticator.cs"
/>
<Compile
Include=
"IAuthenticator.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"TourDataManager.cs"
/>
<Compile
Include=
"TourDataManager.cs"
/>
...
...
TourDataManagerConsoleApplication/Program.cs
View file @
fbf2e42b
...
@@ -11,10 +11,12 @@ namespace TourDataManagerConsoleApplication {
...
@@ -11,10 +11,12 @@ namespace TourDataManagerConsoleApplication {
public
static
void
Main
(
string
[]
args
){
public
static
void
Main
(
string
[]
args
){
//
var tourDataManager = new TourDataManager.TourDataManager(PersistentPath);
var
tourDataManager
=
new
TourDataManager
.
TourDataManager
(
PersistentPath
);
//tourDataManager.Login(defaultLogin, defaultPassword);
//tourDataManager.Login(defaultLogin, defaultPassword);
new
Db
();
//new Db();
tourDataManager
.
GetEstates
();
Console
.
Read
();
Console
.
Read
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment