Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Start observation from address #17

Open
olemis opened this issue Feb 24, 2019 · 0 comments
Open

[api] Start observation from address #17

olemis opened this issue Feb 24, 2019 · 0 comments
Assignees

Comments

@olemis
Copy link
Contributor

olemis commented Feb 24, 2019

[POST] /api/transactions/history/from/{address}/observation

Should start observation of the transactions that transfer fund from the address . Should affect result of the [GET] /api/transactions/history/from/{address} .

Errors:

* `409 Conflict` : transactions from the  address  are already observed.

Python implementation

@api.route('/transactions/history/from/<string:address>/observation', methods=['POST'])
def add_history_from_address(address):
    """
    Starts observation of the transactions that transfer fund from the address 
    """
    
    result = add_transaction_observation_from_address(address)
    
    # if successfully stored in observation list, return a plain 200
    if "error" in result:
        return make_response(jsonify(build_error(result["error"])), result["status"])
    else:
        return ""
lagcleaner pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 27, 2019
lagcleaner pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 27, 2019
…t changed

Changed to:

'status_code':
            description: Descrip.
            content:
              application/json:
                schema:
                  type: string
lagcleaner pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 28, 2019
lagcleaner pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 28, 2019
lagcleaner pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants