Example #1
0
    def _add_client_intro(self, section, client_methods):
        section = section.add_new_section('intro')
        # Write out the top level description for the client.
        official_service_name = get_official_service_name(
            self._client.meta.service_model)
        section.write('A low-level client representing %s' %
                      official_service_name)

        # Write out the client example instantiation.
        self._add_client_creation_example(section)

        # List out all of the possible client methods.
        section.style.new_line()
        section.write('These are the available methods:')
        section.style.new_line()
        for method_name in sorted(client_methods):
            section.style.li(':py:meth:`%s`' % (method_name))
Example #2
0
    def _add_client_intro(self, section, client_methods):
        section = section.add_new_section('intro')
        # Write out the top level description for the client.
        official_service_name = get_official_service_name(
            self._client.meta.service_model)
        section.write(
            'A low-level client representing %s' % official_service_name)

        # Write out the client example instantiation.
        self._add_client_creation_example(section)

        # List out all of the possible client methods.
        section.style.new_line()
        section.write('These are the available methods:')
        section.style.new_line()
        for method_name in sorted(client_methods):
            section.style.li(':py:meth:`%s`' % (method_name))
 def test_aws_short_name(self):
     self.service_model.metadata['serviceAbbreviation'] = 'AWS Foo'
     self.assertEqual('Official Name (Foo)',
                      get_official_service_name(self.service_model))
 def test_no_short_name(self):
     self.assertEqual('Official Name',
                      get_official_service_name(self.service_model))
 def test_short_name_in_official_name(self):
     self.service_model.metadata['serviceFullName'] = 'The Foo Service'
     self.service_model.metadata['serviceAbbreviation'] = 'Amazon Foo'
     self.assertEqual('The Foo Service',
                      get_official_service_name(self.service_model))
Example #6
0
 def _add_description(self, section):
     official_service_name = get_official_service_name(self._service_model)
     section.write('A resource representing an %s %s' %
                   (official_service_name, self._resource_name))
Example #7
0
 def test_aws_short_name(self):
     self.service_model.metadata['serviceAbbreviation'] = 'AWS Foo'
     self.assertEqual('Official Name (Foo)',
                      get_official_service_name(self.service_model))
Example #8
0
 def test_no_short_name(self):
     self.assertEqual('Official Name',
                      get_official_service_name(self.service_model))
Example #9
0
 def test_short_name_in_official_name(self):
     self.service_model.metadata['serviceFullName'] = 'The Foo Service'
     self.service_model.metadata['serviceAbbreviation'] = 'Amazon Foo'
     self.assertEqual('The Foo Service',
                      get_official_service_name(self.service_model))
Example #10
0
 def _add_description(self, section):
     official_service_name = get_official_service_name(self._service_model)
     section.write(f'A resource representing {official_service_name}')
Example #11
0
 def _add_description(self, section):
     official_service_name = get_official_service_name(
         self._service_model)
     section.write(
         'A resource representing an %s %s' % (
             official_service_name, self._resource_name))
Example #12
0
 def _document_title(self, section):
     official_service_name = get_official_service_name(
         self._client.meta.service_model)
     section.style.h1(official_service_name)
Example #13
0
 def _add_description(self, section):
     official_service_name = get_official_service_name(self._service_model)
     section.write("A resource representing %s" % official_service_name)