by

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 2019 18:06
    StevenLiekens commented #59
  • Mar 24 2019 18:05
    StevenLiekens closed #59
  • Mar 24 2019 18:05
    StevenLiekens commented #59
  • Mar 24 2019 17:47
    StevenLiekens closed #58
  • Mar 24 2019 17:47
    StevenLiekens commented #58
  • Mar 19 2019 13:02
    Friesinator edited #59
  • Mar 19 2019 13:01
    Friesinator opened #59
  • Mar 18 2019 12:38
    StevenLiekens commented #58
  • Mar 15 2019 15:19
    GHOSCHT commented #58
  • Mar 14 2019 22:01
    Seeker1437 commented #58
  • Mar 14 2019 20:08
    GHOSCHT commented #58
  • Mar 12 2019 15:40
    StevenLiekens commented #58
  • Mar 10 2019 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
Darnell Williams
@Seeker1437
hey I have a slight issue using the GW2.NT Library, atm my application uses a higher version of Newtonsoft.Json than GW2.NET uses, so when GW2 is making a request it fails to load the verion you guys are using
Command failed: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Darnell Williams
@Seeker1437
Command failed: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Stack Trace:
at GW2NET.Common.Serializers.JsonSerializerFactory.GetSerializer[T]()
   at GW2NET.Common.ServiceClient.DeserializeResponse[TResult](HttpWebResponse response, ISerializerFactory serializerFactory, IConverter`2 gzipInflator)
   at GW2NET.Common.ServiceClient.OnSuccess[T](HttpWebResponse response, ISerializerFactory serializerFactory, IConverter`2 gzipInflator)
   at GW2NET.Common.ServiceClient.OnResponse[TResult](HttpWebResponse response)
   at GW2NET.Common.ServiceClient.Send[TResult](IRequest request)
   at GW2NET.V1.Guilds.GuildRepository.GW2NET.Guilds.IGuildRepository.FindByName(String name)
   at DangerBotCore.DangerBot.<>c.<<CreateCommands>b__12_3>d.MoveNext() in C:\Users\Darnell\Documents\Visual Studio 2015\Projects\DiscordBotCore\DangerBot\DangerBot.cs:line 74
@Ruhrpottpatriot @StevenLiekens
Steven Liekens
@StevenLiekens
you could use a binding redirect in your config file
<configuration>
   <runtime>
      <assemblyBinding>
         <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json"
                              publicKeyToken="30ad4fe6b2a6aeed"
                              culture="neutral" />
            <bindingRedirect oldVersion="6.0.0.0"
                             newVersion="8.0.0.0"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>
Darnell Williams
@Seeker1437
-FUnny thing is that is already there :O
OH!
okay
@StevenLiekens thanks,... the binding redirect was in the incorrect assembly for some reason LOL
Steven Liekens
@StevenLiekens
yeah nuget tries to be smart about it but it doesn't always do the right thing
Steven Liekens
@StevenLiekens
you're better off disabling automatic binding redirects and adding them manually
you'll know when and where you need them
Darnell Williams
@Seeker1437

@StevenLiekens sorry to bug the last thing, I know the the V2 accounts it not a nuget package yet, can it still be used or is there some missing stuff for it?

It looks like basically all the authenticated APIs for v2 are not implemented?

Steven Liekens
@StevenLiekens
I don't know what the state is of the master branch
Darnell Williams
@Seeker1437
gottcha
Steven Liekens
@StevenLiekens
I haven't developed for gw2net in a long time
but
Darnell Williams
@Seeker1437
by request of a client they wanted the bot to be able to verify that a people joining their discord server is indeed a member of their guild, I just realized I don't have a good way of doing so atm XD
Steven Liekens
@StevenLiekens
yeah maybe it's better if you implement that yourself until we figure out where we're going with gw2net
Darnell Williams
@Seeker1437
sure thing :)
Thanks for your assistence
Darnell Williams
@Seeker1437
@StevenLiekens can you explain the way you handle the conversion of json to objects? As you said my system had too many concerns and now I kind see it, i just and not able to understand whats happing in gw2 net to make a simple solution for me xD
shurne
@SamHurne
Hey guys! In case it wasn't obvious, I've been away. I'm finally working on a maintenance release of the PAO... the whole thing is a mess, and I kind of want to just re-write the thing with a proper plugin system, but I don't want to jump into that yet. It looks like the latest release of GW2.Net is 1.4.0? Sounds like there's not much active development going on for GW2.Net? Just wanted to check in on the state of everything... thanks!
Steven Liekens
@StevenLiekens
@SamHurne I've been away from GW2 too so that's why there is little motivation from my end
from what I remember, the current state is that we all agreed that we have to switch out the WebRequest/WebResponse APIs for HttpClient
so that's still ongoing
and then there was some talk about converting from PCLs to netstandard packages
but netstandard doesn't even support WebRequest/WebResponse anymore so that will have to wait until all the code uses HttpClient instead
Steven Liekens
@StevenLiekens
the 1.4 release is stable and it was 100% up to date with the API at the time the package was pushed
any API changes after december 2015 are not supported
by the way I'm only speaking for APIs that are actually implemented
that excludes all of the APIs that require authentication
and also some newer ones like /v2/achievements
the list of endpoints has grown quite a bit in 2016
@Seeker1437 sure
Steven Liekens
@StevenLiekens
the json is first converted to a class that is a 1-to-1 mapping of the json schema
so you get a .NET object with all the same fields as the json object
in GW2.NET these are the xxxDTO classes
like QuagganDTO
[DataContract]
public sealed class QuagganDTO
{
    [DataMember(Name = "id", Order = 0)]
    public string Id { get; set; }

    [DataMember(Name = "url", Order = 1)]
    public string Url { get; set; }
}
so for example
{
  id: "aloha",
  url: "https://static.staticwars.com/quaggans/aloha.jpg"
}
Steven Liekens
@StevenLiekens
is the same as
var data = new QuagganDTO
{
    Id = "aloha",
    Url = "https://static.staticwars.com/quaggans/aloha.jpg"
};
and then there is a whole bunch of custom code to convert from DTO classes to one of the Core classes
converting from QuagganDTO to Quaggan is really just mapping properties
var quaggan = new Quaggan
{
    Id = data.Id,
    Url = new Uri(data.Url);
}
Steven Liekens
@StevenLiekens
for Quaggans there is only one conversion: string to Uri