Skip to content

fix: import from googleapiclient, not apiclient #3458

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

Merged
merged 2 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions functions/slack/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
import json
import os

import apiclient
import googleapiclient
from flask import jsonify

with open('config.json', 'r') as f:
data = f.read()
config = json.loads(data)


kgsearch = apiclient.discovery.build(
kgsearch = googleapiclient.discovery.build(
'kgsearch',
'v1',
developerKey=os.environ.get('API_KEY') or config.get('KG_API_KEY'),
Expand Down
4 changes: 2 additions & 2 deletions functions/slack/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import json

import apiclient
import googleapiclient
import mock
import os
import pytest
Expand All @@ -25,7 +25,7 @@
config = json.loads(data)


kg_search = apiclient.discovery.build('kgsearch', 'v1',
kg_search = googleapiclient.discovery.build('kgsearch', 'v1',
developerKey=os.environ['API_KEY'])
example_response = kg_search.entities().search(query='lion', limit=1).execute()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# specific language governing permissions and limitations
# under the License.
#
from apiclient.discovery import build
from apiclient.http import MediaFileUpload
from googleapiclient.discovery import build
from googleapiclient.http import MediaFileUpload
from googleapiclient import errors

from airflow.contrib.hooks.gcp_api_base_hook import GoogleCloudBaseHook
Expand Down