Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updated Readme for generalized Version
  • Loading branch information
TobiHatti committed Feb 17, 2020
1 parent ea603f9 commit 6e4aaf3
Showing 1 changed file with 8 additions and 64 deletions.
72 changes: 8 additions & 64 deletions README.md
Expand Up @@ -14,39 +14,11 @@ __NOTE: You might have to install the Newtonsoft.Json NuGet-Package__
### Usage (VB.Net)
```vbnet
' Create a connection to the Server
Dim fetcher As AtlasWrapper.AtlasWrapper = New AtlasWrapper.AtlasWrapper("https://sample.serviceprovider.com/atlas", "sampleUser", "samplePassword")
Dim fetcher As AtlasWrapper.AtlasWrapper = New AtlasWrapper.AtlasWrapper("https://sample.serviceprovider.com/atlas", "samplePassword")

' Sets the Fetch-Timespan for requests that utilize the pLastReceivedTS-Parameter
fetcher.FetchSpan = New TimeSpan(3, 0, 0)

' Get registered devices
Dim devices = fetcher.Devices()

' Get device-ignitions
Dim ignitionsA = fetcher.Ignitions(Date.Now.AddHours(-4), Date.Now) ' Does not utilize FetchSpan
Dim ignitionsB = fetcher.Ignitions(Date.Now.AddHours(-4)) ' Does utilize FetchSpan

' Get the current positions of all devices (standard and extended versions)
Dim positionsA = fetcher.Positions()
Dim positionsB = fetcher.PositionsExtended()

' Get the location-history of a device (standard and extended versions)
Dim historyA1 = fetcher.History(8618762024422020, Date.Now.AddHours(-4), Date.Now) ' Does not utilize FetchSpan
Dim historyA2 = fetcher.History(8618762024422020, Date.Now.AddHours(-4)) ' Does utilize FetchSpan

Dim historyB1 = fetcher.HistoryExtended(8618762024422020, Date.Now.AddHours(-4), Date.Now) ' Does not utilize FetchSpan
Dim historyB2 = fetcher.HistoryExtended(8618762024422020, Date.Now.AddHours(-4)) ' Does utilize FetchSpan

' Get the location-history of all devices (standard and extended versions)
Dim totHistoryA = fetcher.TotalHistory(Date.Now.AddHours(-4))
Dim totHistoryB = fetcher.TotalHistoryExtended(Date.Now.AddHours(-4))

' Get list of all registered drivers
Dim drivers = fetcher.Drivers()

' Get the list of refuelings
Dim refuelingsA = fetcher.Refueling(Date.Now.AddHours(-4), Date.Now) ' Does not utilize FetchSpan
Dim refuelingsB = fetcher.Refueling(Date.Now.AddHours(-4)) ' Does utilize FetchSpan
' Get Response
' Gets the response from https://sample.serviceprovider.com/atlas/myCall/myCustomParameters
Dim reply = fetcher.GetResponse("myCall/myCustomParameters")

' Custom API-Request
Dim customA = fetcher.CustomRequest("https://sample.serviceprovider.com/atlas/sampleUser/tasks")
Expand All @@ -56,39 +28,11 @@ Dim customB = AtlasWrapper.AtlasWrapper.CustomRequest("https://sample.servicepro
### Usage (C#)
```cs
// Create a connection to the Server
AtlasWrapper.AtlasWrapper fetcher = new AtlasWrapper.AtlasWrapper("https://sample.serviceprovider.com/atlas", "sampleUser", "samplePassword");

// Sets the Fetch-Timespan for requests that utilize the pLastReceivedTS-Parameter
fetcher.FetchSpan = new TimeSpan(3, 0, 0);

// Get registered devices
dynamic devices = fetcher.Devices();

// Get device-ignitions
dynamic ignitionsA = fetcher.Ignitions(DateTime.Now.AddHours(-4), DateTime.Now);// Does not utilize FetchSpan
dynamic ignitionsB = fetcher.Ignitions(DateTime.Now.AddHours(-4)); // Does utilize FetchSpan
// Get the current positions of all devices (standard and extended versions)
dynamic positionsA = fetcher.Positions();
dynamic positionsB = fetcher.PositionsExtended();

// Get the location-history of a device (standard and extended versions)
dynamic historyA1 = fetcher.History(8618762024422020, DateTime.Now.AddHours(-4), DateTime.Now); // Does not utilize FetchSpan
dynamic historyA2 = fetcher.History(8618762024422020, DateTime.Now.AddHours(-4)); // Does utilize FetchSpan
dynamic historyB1 = fetcher.HistoryExtended(8618762024422020, DateTime.Now.AddHours(-4), DateTime.Now); // Does not utilize FetchSpan
dynamic historyB2 = fetcher.HistoryExtended(8618762024422020, DateTime.Now.AddHours(-4)); // Does utilize FetchSpan
// Get the location-history of all devices (standard and extended versions)
dynamic totHistoryA = fetcher.TotalHistory(DateTime.Now.AddHours(-4));
dynamic totHistoryB = fetcher.TotalHistoryExtended(DateTime.Now.AddHours(-4));

// Get list of all registered drivers
dynamic drivers = fetcher.Drivers();
AtlasWrapper.AtlasWrapper fetcher = new AtlasWrapper.AtlasWrapper("https://sample.serviceprovider.com/atlas", "samplePassword");

// Get the list of refuelings
dynamic refuelingsA = fetcher.Refueling(DateTime.Now.AddHours(-4), DateTime.Now); // Does not utilize FetchSpan
dynamic refuelingsB = fetcher.Refueling(DateTime.Now.AddHours(-4)); // Does utilize FetchSpan
// Get Response
// Gets the response from https://sample.serviceprovider.com/atlas/myCall/myCustomParameters
dynamic reply = fetcher.GetResponse("myCall/myCustomParameters");

// Custom API-Request
dynamic customA = fetcher.CustomRequest("https://sample.serviceprovider.com/atlas/sampleUser/tasks");
Expand Down

0 comments on commit 6e4aaf3

Please sign in to comment.