Sha256: d94e8a650a844bd320a24f274e17f82151de5dd40a3858fcbf2ca37924f4ecee

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

# Licensed under the Upwork's API Terms of Use;
# you may not use this file except in compliance with the Terms.
#
# 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.
#
# Author::    Maksym Novozhylov (mnovozhilov@upwork.com)
# Copyright:: Copyright 2021(c) Upwork.com
# License::   See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html

module Upwork
  module Api
    module Routers
      # Execute GraphQL requests
      class Graphql
        ENTRY_POINT = 'graphql'
        
        # Init
        #
        # Arguments:
        #  client: (Client)
        def initialize(client)
          @client = client
          @client.epoint = ENTRY_POINT 
        end
        
        # Execute GraphQL request
        def execute(params)
          $LOG.i "running " + __method__.to_s
          @client.post '', params
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-upwork-oauth2-2.3.0 lib/upwork/api/routers/graphql.rb
ruby-upwork-oauth2-2.2.0 lib/upwork/api/routers/graphql.rb