zeeguu/api/api/article.py
def find_or_create_article():
    """

        returns the article at that URL or creates an article and returns it
        - url of the article: str
        - htmlContent: str
        - title: str

    :return: article id as json (e.g. {article_id: 123})

    """

    url = request.form.get("url", "")
    htmlContent = request.form.get("htmlContent", "")
    title = request.form.get("title", "")
    authors = request.form.get("authors", "")

    if not url:
        flask.abort(400)

    try:
        article = Article.find_or_create(
            db_session, url, htmlContent=htmlContent, title=title, authors=authors
        )
        return json_result(article.article_info())
    except NoResultFound as e:
        flask.abort(406, "Language not supported")
    except Exception as e:
        from sentry_sdk import capture_exception

        capture_exception(e)
        flask.abort(500)


        returns the article at that URL or creates an article and returns it
        - url of the article: str
        - htmlContent: str
        - title: str

    :return: article id as json (e.g. {article_id: 123})

    
returns the article at that URL or creates an article and returns it
url of the article: str
htmlContent: str
title: str
returns the article at that URL or creates an article and returns it url of the article : str htmlContent : str title : str
def find_or_create_article():
    url = request.form.get("url", "")
    htmlContent = request.form.get("htmlContent", "")
    title = request.form.get("title", "")
    authors = request.form.get("authors", "")
    if not url:
        flask.abort(400)
    try:
        article = Article.find_or_create(
            db_session, url, htmlContent=htmlContent, title=title, authors=authors
        )
        return json_result(article.article_info())
    except NoResultFound as e:
        flask.abort(406, "Language not supported")
    except Exception as e:
        from sentry_sdk import capture_exception
        capture_exception(e)
        flask.abort(500)
def find_or_create_article ( ) : url = request . form . get ( "url" , "" ) htmlContent = request . form . get ( "htmlContent" , "" ) title = request . form . get ( "title" , "" ) authors = request . form . get ( "authors" , "" ) if not url : flask . abort ( 400 ) try : article = Article . find_or_create ( db_session , url , htmlContent = htmlContent , title = title , authors = authors ) return json_result ( article . article_info ( ) ) except NoResultFound as e : flask . abort ( 406 , "Language not supported" ) except Exception as e : from sentry_sdk import capture_exception capture_exception ( e ) flask . abort ( 500 )
returns the article at that URL or creates an article and returns it
 url of the article: str
 htmlContent: str
 title: str
returns the article at that URL or creates an article and returns it url of the article : str htmlContent : str title : str
"""

        returns the article at that URL or creates an article and returns it
        - url of the article: str
        - htmlContent: str
        - title: str

    :return: article id as json (e.g. {article_id: 123})

    """
article id as json
article id as json