Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 24 18:06
    StevenLiekens commented #59
  • Mar 24 18:05
    StevenLiekens closed #59
  • Mar 24 18:05
    StevenLiekens commented #59
  • Mar 24 17:47
    StevenLiekens closed #58
  • Mar 24 17:47
    StevenLiekens commented #58
  • Mar 19 13:02
    Friesinator edited #59
  • Mar 19 13:01
    Friesinator opened #59
  • Mar 18 12:38
    StevenLiekens commented #58
  • Mar 15 15:19
    GHOSCHT commented #58
  • Mar 14 22:01
    Seeker1437 commented #58
  • Mar 14 20:08
    GHOSCHT commented #58
  • Mar 12 15:40
    StevenLiekens commented #58
  • Mar 10 15:46
    GHOSCHT opened #58
  • Apr 15 2018 16:43

    Ruhrpottpatriot on ServiceClient

    Remove superfluous compression … Add simple caching to Core proj… Move files into different folde… and 8 more (compare)

  • Apr 10 2018 21:09

    Ruhrpottpatriot on ServiceClient

    Add fluent api to create HttpRe… Fix Stylecop errors Remove dead code and 3 more (compare)

  • Mar 29 2018 13:11

    Ruhrpottpatriot on NetCore2.0

    Remove disabled and superseded … Delete unused leftover code fro… Move V1.Guild test to appropria… and 8 more (compare)

  • Mar 29 2018 12:17

    Ruhrpottpatriot on NetCore2.0

    Update .gitignore to exclude St… Add Api builder class (compare)

  • Feb 01 2018 09:33

    Ruhrpottpatriot on master

    Refactorize ServiceClient.GetHt… Merge pull request #57 from Kor… (compare)

  • Feb 01 2018 09:33
    Ruhrpottpatriot closed #57
  • Dec 27 2017 17:37
    Korjam opened #57
Robert Logiewa
@Ruhrpottpatriot
Currently in a simple way, yes. But only because I was too lazy to implement a switch for now. Bypassing the cache is a planned feature and I’m currently working on it.
Steven Liekens
@StevenLiekens
if the cache is outside the repository then bypassing the cache is easy
Robert Logiewa
@Ruhrpottpatriot
It’s also easy bypass when inside. The most simple solution is a property on the cache class UseCache, which defaults to true. If the user wants to bypass it, he’d set it to false and voilá
Robert Logiewa
@Ruhrpottpatriot
Look at it this way:
The repository should be the central place to access an API service, it should offer the possibility to get all information a service can offer in the most convinient way possible. It also should offer customisation.
Example: A user only wants to query the API for items, nothing else. He then could download the GW2NET.Items package. He then would be responsible for instantaniating the repository itself, but does that mean we can’t take work off him? No
If we’d move the cache outside of the repository he’d be responsible for caching too. Why should he?
On a more theoretical level: A repository stores data and controls the access to it. Therefore it should be reponsible for caching too. This is also what MSDN tells us.
Steven Liekens
@StevenLiekens
I was thinking about distributed caching and all that
Robert Logiewa
@Ruhrpottpatriot
I don’t think that would benefit us that much. Currently the cache uses a SortedSet<T> (might switch toHashSet<T>) to store data (we might need to improve on hashing, btw) and keep access times at O(long. This keeps the cache implementation small and lightweight. With a distributed cache we need to keep more things in mind and implementation would be more complex.
Robert Logiewa
@Ruhrpottpatriot
Update on things: Everything is running smoothly. I decided on a DI Container (DryIoC, which is super small and fast) and as of now ahve no problems can could remove some now unused code.
Kaleb Elwert
@belak
So, I'm pretty new to C# and Visual Studio in general, but is there a good way to just browse the docs for GW2.NET?
Kaleb Elwert
@belak
Also, are the APIs currently implemented only publicly accessible ones? Like ones that don't need an API key?
Kaleb Elwert
@belak
Just found MumbleLink... that's pretty cool
            foreach (var mn in GW2.V1.MapNames.ForCurrentUICulture().FindAll())
            {
                /*
                Console.Write(mn.Value.MapId);
                Console.Write(" ");
                Console.WriteLine(mn.Value.Name);
                */

                if (mn.Value.MapId == x.Identity.MapId)
                {
                    Console.WriteLine(mn.Value.Name);
                }
            }
Is there a better way of doing that?
Where x is an Avatar (I think that's what you get when you read in the MumbleLinkFile)
Since using MapNames.Find with the map id isn't working right

Or rather:

            Console.WriteLine(GW2.V2.Maps.ForCurrentUICulture().Find(x.Identity.MapId));
            Console.WriteLine(GW2.V1.MapNames.ForCurrentUICulture().Find(x.Identity.MapId));

Why does it work with V2, but throw an error with V1?

Robert Logiewa
@Ruhrpottpatriot
We also support authenticated endpoints. You just have to pass your API key to the bootstrapper.
You most likely can't use V1 because the endpoint is disabled (by ANet, not by us).
As for documentation: Just look at the github Wiki, that should give you everything you'll need
Kaleb Elwert
@belak
Thanks
Robert Logiewa
@Ruhrpottpatriot
@/all Just pointing you all to a feature request I made: arenanet/api-cdi#234
commenting on it would be nice.
Robert Logiewa
@Ruhrpottpatriot
ok
nearly finished
by refactorying cut (almost) each V2 repository to about 50 lines of code. Special repositories did keep their structure intact and special operations are still there
Now if we have a new endpoint which follows the usual v2 schema, we only need to implement up to three interfaces (which consist of one or two peroerties) and one base class and we are good to go
Robert Logiewa
@Ruhrpottpatriot
Question: Should we consolidate the current module libraries into bigger ones (i.e. Acheivements, Guild, etc.)? Most modules only contain three or four classes now.
Steven Liekens
@StevenLiekens
:+1:
yeah idk about having one dll for every endpoint
it made sense at the time
now I'm not sure
Robert Logiewa
@Ruhrpottpatriot
Yeah, me too. It blows the number of DLLs out of proportion. Thus I'm proposing to make a DLL for each category... In fact I'm doing that now. Should speed up compilation as well
Btw: @StevenLiekens I'm not really good with T4 templates, so before release you mught have to look over the converter templates and change them so they fit the new system (i.e. replace IResponse with ApiMetadata where fitting)
Steven Liekens
@StevenLiekens
if you want then you can delete the templates
Robert Logiewa
@Ruhrpottpatriot
how come?
Steven Liekens
@StevenLiekens
run them one more time to generate up-to-date converters
because they are only meant to speed up development for new types
Robert Logiewa
@Ruhrpottpatriot
ah
Steven Liekens
@StevenLiekens
there were a lot of missing entity types between 1.3 and 1.4
Robert Logiewa
@Ruhrpottpatriot
ah, makes sense
I thought about making the converter more generic. But this'll be a change for 2.x
Steven Liekens
@StevenLiekens
(Build -> Transform All T4 Templates)
Robert Logiewa
@Ruhrpottpatriot
Ok I'll remove the templates then
Steven Liekens
@StevenLiekens
between T4 templates, automapper or manually writing converters, which one is worse?
or what other choice do we have?
Robert Logiewa
@Ruhrpottpatriot
Probably not much
Steven Liekens
@StevenLiekens
I wish razor templates were a thing outside MVC
Robert Logiewa
@Ruhrpottpatriot
I'd like to have something like I did with the repositories: Have one basic converter and then just inject the conversion logic for an object
it's similar to what we do now
but maybe we can optimize that a bit
Steven Liekens
@StevenLiekens
oh jeez
found this gem in one of our projects at work