Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #175 from omu/yoksis_v4
Browse files Browse the repository at this point in the history
Add a sample endpoint for API restriction checks
  • Loading branch information
msdundar authored Aug 5, 2018
2 parents b1060fb + f8a9f67 commit 13bf940
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/services/yoksis/v4/universiteleri_birimler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

module Services
module Yoksis
module V4
# client = Services::Yoksis::V4::UniversiteBirimler.new
class UniversiteBirimler
def initialize
wsdl = 'http://servisler.yok.gov.tr/ws/UniversiteBirimlerv4?WSDL'

@client = Savon.client(
wsdl: wsdl,
convert_request_keys_to: :camelcase,
basic_auth: [Rails.application.credentials.yoksis[:user], Rails.application.credentials.yoksis[:password]]
)
end

# alias: list_countries
def universiteleri_getirv4
@client.call(__method__).body
end

alias universities universiteleri_getirv4
end
end
end
end

0 comments on commit 13bf940

Please sign in to comment.