Module Expr Str Import alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias Import alias Assign NameStore Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str keyword Str keyword AttributeLoad NameLoad attr Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Return TupleLoad Call AttributeLoad NameLoad attr keyword ListLoad NameLoad Num decorator_list Call AttributeLoad NameLoad attr Num FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Return TupleLoad Call AttributeLoad NameLoad attr keyword ListLoad NameLoad Num decorator_list Call AttributeLoad NameLoad attr Num FunctionDef arguments args NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr CompareNotEq NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr Num decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Dict Str Dict Str Dict For NameStore NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr keyword NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword ListLoad Str FunctionDef arguments args defaults body Expr Str Return Str decorator_list Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Str NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad keyword Call AttributeLoad NameLoad attr NameLoad
N/A N/A 
  Wikipedia channel for IFTTT
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Copyright 2015 Ori Livneh <ori@wikimedia.org>,
                 Stephen LaPorte <stephen.laporte@gmail.com>

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

 N/A flask utils snake_case triggers ArticleOfTheDay PictureOfTheDay WordOfTheDay ArticleRevisions UserRevisions NewArticle NewHashtag NewCategoryMember CategoryMemberRevisions N/A logging N/A LOG_FILE ifttt.log N/A N/A N/A logging basicConfig filename LOG_FILE format %(asctime)s - %(message)s datefmt %m/%d/%Y %I:%M:%S %p level N/A logging DEBUG N/A ALL_TRIGGERS N/A ArticleOfTheDay PictureOfTheDay WordOfTheDay ArticleRevisions UserRevisions NewArticle NewHashtag NewCategoryMember CategoryMemberRevisions N/A app N/A N/A flask Flask __name__ N/A N/A N/A N/A app config from_pyfile ../ifttt.cfg silent True unauthorized N/A N/A e N/A N/A N/A There was something wrong with incoming data from IFTTT.  N/A error N/A message missing required trigger field N/A N/A N/A N/A flask jsonify errors N/A error 400 N/A N/A N/A app errorhandler 400 unauthorized N/A N/A e N/A N/A N/A Issue an HTTP 401 Unauthorized response with a JSON body. N/A error N/A message Unauthorized N/A N/A N/A N/A flask jsonify errors N/A error 401 N/A N/A N/A app errorhandler 401 force_content_type N/A N/A response N/A N/A N/A RFC 4627 stipulates that 'application/json' takes no charset parameter,
    but IFTTT expects one anyway. We have to twist Flask's arm to get it to
    break the spec. N/A N/A N/A response headers N/A Content-Type application/json; charset=utf-8 N/A response N/A N/A app after_request validate_channel_key N/A N/A N/A N/A N/A Verify that the 'IFTTT-Channel-Key' header is present on each request
    and that its value matches the channel key we got from IFTTT. If a request
    fails this check, we reject it with HTTP 401. N/A channel_key N/A N/A N/A N/A flask request headers get IFTTT-Channel-Key N/A N/A N/A N/A app debug N/A channel_key N/A N/A N/A app config get CHANNEL_KEY N/A N/A N/A N/A flask abort 401 N/A N/A app before_request test_setup N/A N/A N/A N/A N/A Required by the IFTTT endpoint test suite. N/A ret N/A samples N/A triggers N/A N/A trigger ALL_TRIGGERS N/A N/A trigger_name N/A snake_case N/A trigger __name__ N/A N/A trigger default_fields N/A N/A N/A N/A N/A ret N/A samples N/A triggers N/A trigger_name N/A trigger default_fields N/A N/A N/A flask jsonify data ret N/A N/A N/A app route /v1/test/setup methods N/A POST status N/A N/A N/A N/A N/A Return HTTP 200 and an empty body, as required by the IFTTT spec. N/A N/A N/A N/A app route /v1/status N/A view_class ALL_TRIGGERS N/A N/A slug N/A getattr view_class url_pattern None N/A N/A slug N/A N/A slug N/A snake_case N/A view_class __name__ N/A N/A N/A app add_url_rule N/A /v1/triggers/%s slug view_func N/A N/A view_class as_view slug