Did I find the right examples for you? yes no

All Samples(47)  |  Call(45)  |  Derive(0)  |  Import(2)

src/s/y/synnefo-HEAD/snf-astakos-app/astakos/api/quotas.py   synnefo(Download)
import astakos.quotaholder_app.callpoint as qh
 
from .util import (json_response, is_integer, are_integer, check_is_dict,
                   user_from_token, component_from_token)
 
    result = get_user_quotas(request.user, resources=resource_names,
                             sources=sources)
    return json_response(result)
 
 
        raise ItemNotFound("No such user '%s'" % user)
 
    return json_response(result)
 
 
        raise ItemNotFound("No such project '%s'" % project)
 
    return json_response(result)
 
 
@api.api_method(http_method='GET', token_required=False, user_required=False)
def resources(request):
    resources = get_visible_resources()
    result = register.resources_to_dict(resources)
    return json_response(result)

src/l/u/lusernews-HEAD/src/api.py   lusernews(Download)
            'error': 'username ' + msg
            }
        return util.json_response(result)
 
    password, msg = util.check_string(password, config.PasswordMinLength)
            'error': 'password ' + msg
            }
        return util.json_response(result)
 
    r = g.redis
            'error': 'invalid invitation code',
            }
            return util.json_response(result)
 
        #mark as used
            'auth': auth,
            }
    return util.json_response(result)
 
 
            'error': 'username ' + msg
            }
        return util.json_response(result)
 
    password, msg = util.check_string(password)

src/s/y/synnefo-HEAD/snf-astakos-app/astakos/api/tokens.py   synnefo(Download)
from astakos.oa2.backends.base import OA2Error
from astakos.oa2.backends.djangobackend import DjangoBackend
from .util import json_response, xml_response, validate_user,\
    get_content_length
 
        return xml_response({'d': d}, 'api/access.xml')
    else:
        return json_response(d)
 
 
        return xml_response({'d': d}, 'api/access.xml')
    else:
        return json_response(d)