Skip to main content
Commonmark migration
Source Link

On /users/{id}/badges, the description of the id parameter

a semicolon delimited list of user ids

diverges from the inferred standard for multi-valued parameters:

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way "list" parameters are handled vs "vectorized" parameters?

It is my understanding that "vectorized" means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters I've come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

#Conclusion

Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

On /users/{id}/badges, the description of the id parameter

a semicolon delimited list of user ids

diverges from the inferred standard for multi-valued parameters:

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way "list" parameters are handled vs "vectorized" parameters?

It is my understanding that "vectorized" means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters I've come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

#Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

On /users/{id}/badges, the description of the id parameter

a semicolon delimited list of user ids

diverges from the inferred standard for multi-valued parameters:

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way "list" parameters are handled vs "vectorized" parameters?

It is my understanding that "vectorized" means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters I've come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

API Help Suggestion: /users/{id}/badges id parameter clarification

On /users/{id}/badges/users/{id}/badges, the description of the id parameter

a semicolon delimited list of user ids

diverges from the inferred standard.

e.g.

a semicolon delimited list of user ids

vs for multi-valued parameters:

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way the parameter is"list" parameters are handled vs vectorized ids"vectorized" parameters?

It is my understanding that 'vectorized'"vectorized" means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters iI've come up with these variants:


id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids
id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

#Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

API Help Suggestion: /users/{id}/badges id parameter clarification

On /users/{id}/badges, the description of id parameter diverges from the inferred standard.

e.g.

a semicolon delimited list of user ids

vs

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way the parameter is handled vs vectorized ids?

It is my understanding that 'vectorized' means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters i come up with these variants:


id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

#Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

/users/{id}/badges id parameter clarification

On /users/{id}/badges, the description of the id parameter

a semicolon delimited list of user ids

diverges from the inferred standard for multi-valued parameters:

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way "list" parameters are handled vs "vectorized" parameters?

It is my understanding that "vectorized" means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters I've come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

#Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}
deleted 3 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60

On /users/{id}/badges, the description of id parameter diverges from the inferred standard.

e.g.

a semicolon delimited list of user ids

vs

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way the parameter is handled vs vectorized ids?

It is my understanding that 'vectorized' means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters i come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

Conclusion #Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

On /users/{id}/badges, the description of id parameter diverges from the inferred standard.

e.g.

a semicolon delimited list of user ids

vs

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way the parameter is handled vs vectorized ids?

It is my understanding that 'vectorized' means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters i come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}

On /users/{id}/badges, the description of id parameter diverges from the inferred standard.

e.g.

a semicolon delimited list of user ids

vs

A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.

Is this intentional and is there a difference in the way the parameter is handled vs vectorized ids?

It is my understanding that 'vectorized' means that constituent values must be sorted in ascending order. Is this correct?

UPDATE:

Upon dumping all parameters i come up with these variants:

id  string  A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
id  string  a semicolon delimited list of user ids
id  string  semi-colon delimited list of post ids

Can these all be treated similarly?

#Conclusion

I got the answer I was looking for and am able to generate code that passes the following tests:

Tags (arbitrary number of strings):

[Test]
public void CheckParamArrayTags()
{
    var client = new SoapiClient("api.stackoverflow.com", "");

    QuestionsTaggedByTagsResponse response = client.QuestionsTaggedByTags("sqlite", "sqlite3", "c#").GetResult();


    Assert.Greater(response.Questions.Count,0);

    Assert.IsTrue(
        response.Questions.All(
            q => q.Tags.Contains("sqlite") && q.Tags.Contains("sqlite3") && q.Tags.Contains("c#")));
}

Ids (arbitrary number of int32)

[Test]
public void CheckParamArrayId()
{

    var client = new SoapiClient("api.stackoverflow.com", "");

    UsersByIdResponse response = client.UsersById(242897, 1).GetResult();

    Assert.AreEqual(2, response.Users.Count);
    Assert.IsTrue(response.Users.Any(u => u.UserId == 1));
    Assert.IsTrue(response.Users.Any(u => u.UserId == 242897));
}
added 1100 characters in body; added 2 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading
added 337 characters in body
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading
Source Link
Sky Sanders
  • 12.1k
  • 3
  • 32
  • 60
Loading