3 replaced http://stackapps.com/ with https://stackapps.com/
source | link

UPDATE: min/max on users by name is now case insensitive resulting in a viable 'exact match'. e.g. min=john&max=john see http://stackapps.com/questions/1060should min/max for alpha-numeric cases be case-insensitive?


the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc

UPDATE: min/max on users by name is now case insensitive resulting in a viable 'exact match'. e.g. min=john&max=john see http://stackapps.com/questions/1060


the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc

UPDATE: min/max on users by name is now case insensitive resulting in a viable 'exact match'. e.g. min=john&max=john see should min/max for alpha-numeric cases be case-insensitive?


the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc

2 added 171 characters in body
source | link

UPDATE: min/max on users by name is now case insensitive resulting in a viable 'exact match'. e.g. min=john&max=john see http://stackapps.com/questions/1060


the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc

the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc

UPDATE: min/max on users by name is now case insensitive resulting in a viable 'exact match'. e.g. min=john&max=john see http://stackapps.com/questions/1060


the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc

1
source | link

the min/max solution that codeka presents seems to work great. While it does not guarantee accurate results, it does drastically reduce network traffic.

I simply check again when I get the results back and filter out non-matches client side, e.g.

Soapi.RouteFactory(site.api_endpoint, apiKey)
    .Users(
    {
        min: username.toLowerCase(),
        max: username.toUpperCase(),
        sort: Soapi.Domain.UserSort.name
    })
    .getPagedResponse(function(data)
    {
        $.each(data.items, function(ignored, user)
        {
            if (user.display_name.toUpperCase() == username.toUpperCase())
            {

                // set the site so we can render links and logo.
                // this can be refactored down to a literal with needed fields only
                user.on_site = site;

http://api.stackoverflow.com/0.9/users?sort=name&min=joey&max=JOEY&order=desc