Showing Posts For cawtx.2016:

Revel [REV] Blackgate NA Competitive WvW/PvX

in Looking for...

Posted by: cawtx.2016

cawtx.2016

Stef,

I sent you a pm on this forum with a follow-up question on builds after browsing REV’s website.

Revel [REV] Blackgate NA Competitive WvW/PvX

in Looking for...

Posted by: cawtx.2016

cawtx.2016

For WvW what build do you consider appropriate for a Revenant? I’m currently fully ascended equipped with Berserker stats and want to learn/play WvW.

LF WvW

in Looking for...

Posted by: cawtx.2016

cawtx.2016

Looking to learn and contribute to WvW. No prior experience.
Have a Revenant and a Hunter, both with full ascended, primarily, berserker gear.
Currently on NA Fort Aspenwood, but will change servers.
Generally play in the mornings, cst, but will play in evening scheduled events.
Have TS3 and have used most of the VOIPs sometime in the past.
I’m a casual player, but take my role in events seriously.

Guild Members Logged On #144

in API Development

Posted by: cawtx.2016

cawtx.2016

Last year a request was raised for an API for the number of guild members logged on. If memory serves, it was then requested to include representing or not, then toon location, which led to discussions on privacy,

What is the status of issue #144?

Scheduled Fractals

in Looking for...

Posted by: cawtx.2016

cawtx.2016

Looking for a guild that schedules and runs fractals. I’m fractal level 11 and generally play in the mornings between 7:00-9:00 cst.

Authentication and jQuery

in API Development

Posted by: cawtx.2016

cawtx.2016

Not mentioned in OP, but a setting of
data : {"access_token" : “<token>”}
does work and allows me access to the endpoint, but this does not seem to be a satisfying solution which is why I posted the question and I am interested if there is a better way.

Authentication and jQuery

in API Development

Posted by: cawtx.2016

cawtx.2016

I’ve been able to access all authenticated endpoints with C#, but am having problems with jQuery. Tried both $.ajax() and $.getJSON(). Also tried different settings in the function which are commented out in the code below.

How do you authenticate with jQuery.ajax() and/or $.getJson()?

$(document).ready(function () {
$(“button”).on(“click”, function () {
$.ajax(‘https://api.guildwars2.com/v2/characters’, {
type: “GET”,
dataType: “json”,
//beforeSend : function (xhr) {xhr.setRequestHeader(“Authorization”, “Bearer <token>”)},
//headers : {Authorization : “Bearer <token>”},
xhrFields: {Authorization : “Bearer <token>”},
complete : function (resp) {console.log(resp);},
error: function(jqXHR, textStatus, errorThrown) {console.log(textStatus);}
});});});

LFGuild on FA (Casual, Zerg’r, Mornings, PvE)

in Looking for...

Posted by: cawtx.2016

cawtx.2016

I have two goals this year: earn Dungeon Master achievement and advance into fractal double digit levels.

I’m retired, generally play in the mornings (7-10 cst), have an 80 Ranger with a mix of ascended/exotic gear, prefer to follow and not lead, use VOIP for listening and questions (not much of a general conversationalist), enjoy participating in the guild website forum, and active user of APIs to pull data from ANet servers. Not a prude (military in the 60s), but tend to avoid crude language.

Married for 38 years (first and only for both me and my wife) and my primary real life interest is Philosophy of Mind.

Tres Xxx

Guild Permission

in API Development

Posted by: cawtx.2016

cawtx.2016

I am not a guild leader but want to access guild info. Is the guild permission alone sufficient such that our guild leader could create an API key with that single permission and give it to me and still maintain his account security?

Issue Reports: Heart of Thorns [Merged]

in Bugs: Game, Forum, Website

Posted by: cawtx.2016

cawtx.2016

The waypoints in Dragon Stand are always contested making them useless.

Precondition Error When Reading Pages

in API Development

Posted by: cawtx.2016

cawtx.2016

Additional info.
I use Visual Studio 2015, the released community version, and .net 4.5.2. I run the program in debug mode and the code above was copied directly from the project.cs. With page_size set to 200 the collection count is 45. The error for recipes occurs around page numbers 40-41. With recipes I get the single exception and with items I have several.

I loaded GW2NET using the Nuget package manager in VS. The documentation states the version of the API is 1.0.1.

Precondition Error When Reading Pages

in API Development

Posted by: cawtx.2016

cawtx.2016

The exception occurs with recipes and items, but I have not seen it with prices or discovery. On the exception i lose the 200 pages. If I do one page at a time, the exception still occurs but I lose only the one item. The complete code edited in VS 2015

using System;
using GW2NET;
using GW2NET.Common;
using System.IO;

namespace TestGW2NET
{
class TestGW2NET
{
static void Main(string[] args)
{
var service = GW2.V2.Recipes.ForDefaultCulture();

foreach (var item in service.FindAllPages(200, 45))
{
try
{
foreach (var _r in item.Value)
{
Console.Write(“\r{0}”, _r.RecipeId.ToString());
}
}
catch (Exception ex)
{
using (StreamWriter outfile = new StreamWriter(@"C:\Users\Public\StackTrace.txt"))
{
outfile.WriteLine(ex.StackTrace.ToString());
}
}
}
Console.WriteLine(“\r\nDone”);
Console.ReadKey():
}
}
}

The stacktrace from the exception
at GW2NET.Items.ItemStack.set_Count(Int32 value)
at GW2NET.V2.Recipes.ConverterForItemStack.Convert(IngredientDataContract value)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at GW2NET.Common.Converters.ConverterForCollection`2.Convert(ICollection`1 value)
at GW2NET.V2.Recipes.ConverterForRecipe.Convert(RecipeDataContract value)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at GW2NET.Common.ConverterForCollectionPageResponse`2.GW2NET.Common.IConverter<GW2NET.Common.IResponse<System.Collections.Generic.ICollection<TDataContract>>,GW2NET.Common.ICollectionPage<TValue>>.Convert(IResponse`1 value)
at GW2NET.V2.Recipes.RecipeRepository.GW2NET.Common.IPaginator<GW2NET.Recipes.Recipe>.FindPage(Int32 pageIndex, Int32 pageSize)
at GW2NET.Common.Paginator.<>c__DisplayClassc`1.<FindAllPages>b__9()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at TestGW2NET.TestGW2NET.Main(String[] args) in C:\Users\Public\Documents\Visual Studio 2015\Projects\GW2API\TestGW2NET\TestGW2NET.cs:line 18

Precondition Error When Reading Pages

in API Development

Posted by: cawtx.2016

cawtx.2016

The exception occurs with both recipes and items. I added the try/catch after the fact to catch unhandled exceptions. The exception is System.ArgumentOutOfRange. The error message is:
Precondition: value < 256
Parameter name: value
Actual value was 500.

The statement throwing the exception is “foreach (var _r in page.Value)” which iterates through the data from “service.FindAllPages(ctx.PageSize, ctx.PageCount)” which, I believe, is from GW2NET.

Precondition Error When Reading Pages

in API Development

Posted by: cawtx.2016

cawtx.2016

When using FindAllPages () for Items or Recipes I get the error:
Precondition: value < 256
Parameter name: value
Actual value was 500.

The underlined bold code generates the exception. The exception seems to lose one page of data. For example, with recipes the Discovery() count is 9050, but after the error I only stored 8850 recipes. Any thoughts?

var service = GW2.V2.Recipes.ForDefaultCulture();
IPageContext ctx = service.FindPage(pageSize: 200, pageIndex: 0);
try
{
foreach (var page in service.FindAllPages(ctx.PageSize, ctx.PageCount))
{
try
{
foreach (var _r in page.Value) { }
}
catch (Exception ex) { Console.WriteLine(“Inner foreach: {0}”,ex.Message); }
}
}
catch (Exception ex) { Console.WriteLine(“Outer foreach: {0}”,ex.Message); }

LFG (PvE, casual, FA)

in Looking for...

Posted by: cawtx.2016

cawtx.2016

I have one character (80 Ranger), normally play during the day, and want to join a guild where I can learn the dungeons starting with the Catacombs and progressing through the fractals in a drama free environment. I tend to be a listener and not a talker on voice chat.

By casual I mean I play for enjoyment and will put in the time, but do not:

  • Seek immediate gratification,
  • Live vicariously through my toon,
  • Obsess over optimum builds and gear,
  • Fret over wipes, mistakes, and errors.

Tres Xxx