watson_developer_cloud.discovery_v1 module¶
The v1 Discovery Service (http://www.ibm.com/watson/developercloud/doc/discovery/)
-
class
DiscoveryV1
(version, url='https://gateway.watsonplatform.net/discovery/api', username=None, password=None, use_vcap_services=True)[source]¶ Bases:
watson_developer_cloud.watson_developer_cloud_service.WatsonDeveloperCloudService
Client for Discovery service
-
get_environment
(environment_id)[source]¶ Retrieves information about the specific :param environment_id: :return:
-
create_environment
(name='', description='', size=1)[source]¶ Parameters: - name – name of the environment (max 255 chars) can be empty
- description – description of the environment (max 255 chars)
can be empty :param size: size of the environment (1,2, or 3) :return:
-
update_environment
(environment_id, name='', description='')[source]¶ Parameters: - environment_id – guid of the environment to modify
- name – update the name of the environment
- description – update the description of the environment
Returns:
-
delete_environment
(environment_id)[source]¶ Deletes the specified environment. :param environment_id: guid of environment to delete :return:
-
list_collections
(environment_id)[source]¶ Retrieves information about the collections within a given environment :param environment_id: this is the guid of a valid environment :return: json results of the collections in an environment
-
get_collection
(environment_id, collection_id)[source]¶ Retrieves information about a sepcific collection in an environment :param environment_id: the guid of a valid environment :param collection_id: the guid of a valid collection :return: json results of the collection information
-
add_document
(environment_id, collection_id, file_info=None, file_data=None, mime_type=None, metadata=None)[source]¶
-