<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions 
	xmlns:typens="blogun.ru/blogun/soap" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns="http://schemas.xmlsoap.org/wsdl/" 
	targetNamespace="blogun.ru/blogun/soap" name="BlogunSoap">
<wsdl:documentation></wsdl:documentation>
<wsdl:types>
	<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="blogun.ru/blogun/soap">				
                <xsd:complexType name="campaignInfo">
                        <xsd:annotation>Тип данных,описывающий кампанию</xsd:annotation>
                        <xsd:sequence>
                                <xsd:element name="idCampaign" type="xsd:int"></xsd:element>
                                <xsd:element name="AddDate" type="xsd:int"></xsd:element>
                                <xsd:element name="Title" type="xsd:string"></xsd:element>			
                                <xsd:element name="PostCount" type="xsd:int"></xsd:element>
                                <xsd:element name="SumBilled" type="xsd:float"></xsd:element>
                                <xsd:element name="SumReaders" type="xsd:int"></xsd:element>
                                <xsd:element name="Status" type="xsd:string"></xsd:element>		
                        </xsd:sequence>			
                </xsd:complexType>

                <xsd:complexType name="blogInfo">
                        <xsd:annotation>Тип данных,описывающий блог</xsd:annotation>
                        <xsd:sequence>
                                <xsd:element name="idBlog" type="xsd:int"></xsd:element>
                                <xsd:element name="url" type="xsd:string"></xsd:element>
                                <xsd:element name="YandexTic" type="xsd:int"></xsd:element>			
                                <xsd:element name="YIndexed" type="xsd:int"></xsd:element>
                                <xsd:element name="GooglePR" type="xsd:int"></xsd:element>
                                <xsd:element name="GIndexed" type="xsd:int"></xsd:element>
                        </xsd:sequence>			
                </xsd:complexType>

                <xsd:complexType name="blogInfoArray">
                        <xsd:annotation>Тип данных,описывающий блог</xsd:annotation>
                        <xsd:sequence>
                                <xsd:element maxOccurs="unbounded" minOccurs="0" name="blogInfoArray" type="typens:blogInfo"/>
                        </xsd:sequence>		
                </xsd:complexType>

                <xsd:complexType name="blogsInfoResponse">
                        <xsd:sequence>
                                <xsd:element maxOccurs="1" minOccurs="0" name="blogInfoArray" type="typens:blogInfoArray"/>
                                <xsd:element name="totalCount" type="xsd:int" maxOccurs="1" minOccurs="0" />
                        </xsd:sequence>	
                </xsd:complexType>


                <xsd:complexType name="requestsInfoArray">
                        <xsd:annotation>Тип данных, описывающий заявки</xsd:annotation>
                        <xsd:sequence>
                                <xsd:element maxOccurs="unbounded" minOccurs="0" name="postInfo" type="typens:postInfo"/>
                        </xsd:sequence>		
                </xsd:complexType>
                
                <xsd:complexType name="requestsInfoResponse">
                        <xsd:sequence>
                                <xsd:element maxOccurs="1" minOccurs="0" name="requestsInfoArray" type="typens:requestsInfoArray"/>
                                <xsd:element name="totalCount" type="xsd:int" maxOccurs="1" minOccurs="0" />
                        </xsd:sequence>	
                </xsd:complexType>

                <xsd:complexType name="campaignsInfo">
                        <xsd:sequence>
                                <xsd:element maxOccurs="unbounded" minOccurs="0" name="campaign" type="typens:campaignInfo"/>
                        </xsd:sequence>
                </xsd:complexType>	

                <xsd:complexType name="postInfo">
                        <xsd:sequence>
                                <xsd:element name="idPost" type="xsd:unsignedInt"></xsd:element>
                                <xsd:element name="idBlog" type="xsd:int"></xsd:element>
                                <xsd:element name="idCampaign" type="xsd:int"></xsd:element>
                                <xsd:element name="PostDate" type="xsd:int"></xsd:element>
                                <xsd:element name="Billed" type="xsd:float"></xsd:element>
                                <xsd:element name="PostUrl" type="xsd:string"></xsd:element>
                                <xsd:element name="size" type="xsd:string"></xsd:element>
                        </xsd:sequence>
                </xsd:complexType>

                <xsd:complexType name="blogFilter">
                        <xsd:sequence>
                                <xsd:element name="CyFrom" type="xsd:int"></xsd:element>
                                <xsd:element name="CyTo" type="xsd:int"></xsd:element>
                                <xsd:element name="PrFrom" type="xsd:int"></xsd:element>
                                <xsd:element name="PrTo" type="xsd:int"></xsd:element>
                                <xsd:element name="YandexIndexFrom" type="xsd:int"></xsd:element>
                                <xsd:element name="YandexIndexTo" type="xsd:int"></xsd:element>
                                <xsd:element name="GoogleIndexFrom" type="xsd:int"></xsd:element>
                                <xsd:element name="GoogleIndexTo" type="xsd:int"></xsd:element>
                        </xsd:sequence>
                </xsd:complexType>

                <xsd:complexType name="campaignPostsInfo">		
                        <xsd:sequence>			  
                                <xsd:element name="idCampaign" type="xsd:int"></xsd:element>
                                <xsd:element name="Title" type="xsd:string"></xsd:element>				
                                <xsd:element maxOccurs="unbounded" minOccurs="0" name="post" type="typens:postInfo"></xsd:element>				
                        </xsd:sequence>			
                </xsd:complexType>									

                <xsd:complexType name="betweenInfo">
                        <xsd:sequence>
                                <xsd:element name="from" type="xsd:int"></xsd:element>
                                <xsd:element name="to" type="xsd:int"></xsd:element>
                        </xsd:sequence>
                </xsd:complexType>

                <xsd:complexType name="postConfirmArray">
                        <xsd:sequence>
                                <xsd:element name="postConfirm" type="typens:postConfirm"></xsd:element>
                        </xsd:sequence>
                </xsd:complexType>

                <xsd:complexType name="postConfirm">
                        <xsd:sequence>
                                <xsd:element name="idPost" type="xsd:unsignedInt"></xsd:element>
                                <xsd:element name="size" type="xsd:string"></xsd:element>
                                <xsd:element name="price" type="xsd:float"></xsd:element>
                        </xsd:sequence>
                </xsd:complexType>

                <xsd:complexType name="ResponseArray">
                        <xsd:sequence>
                                <xsd:element name="error" type="xsd:string" maxOccurs="unbounded" minOccurs="0" ></xsd:element>
                                <xsd:element name="node" type="xsd:string" maxOccurs="unbounded" minOccurs="0" ></xsd:element>
                        </xsd:sequence>
                </xsd:complexType>        
	</xsd:schema>
</wsdl:types>

<wsdl:message name="blogunApi_loginRequest">
	<wsdl:part name="login" type="xsd:string"></wsdl:part>
	<wsdl:part name="password" type="xsd:string"></wsdl:part>
	<wsdl:part name="isMd5" type="xsd:int"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_loginResponse">
	<wsdl:part name="answer" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_logoutRequest">
	<wsdl:part name="userKey" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_logoutResponse">
	<wsdl:part name="result" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getBalanceRequest">
	<wsdl:part name="userKey" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getBalanceResponse">
	<wsdl:part name="result" type="xsd:float"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getProjectsRequest">
	<wsdl:part name="key" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getProjectsResponse">
	<wsdl:part type="typens:campaignsInfo" name="campaigns"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getBlogsRequest">
        <wsdl:part name="key" type="xsd:string"></wsdl:part>
        <wsdl:part name="filter" type="typens:blogFilter"></wsdl:part>
        <wsdl:part name="page" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getBlogsResponse">
	<wsdl:part name="blogs" type="typens:blogsInfoResponse"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getRequestsRequest">
        <wsdl:part name="key" type="xsd:string"></wsdl:part>
	<wsdl:part name="page" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getRequestsResponse">
	<wsdl:part name="blogs" type="typens:requestsInfoResponse"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_getProjectInfoRequest">
	<wsdl:part name="campaignId" type="xsd:int"></wsdl:part>
	<wsdl:part name="time" type="typens:betweenInfo"></wsdl:part>
	<wsdl:part name="userKey" type="xsd:string"></wsdl:part>	
</wsdl:message>

<wsdl:message name="blogunApi_getProjectInfoResponse">
	<wsdl:part name="campaignPosts" type="typens:campaignPostsInfo"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_changeProjectRequest">
	<wsdl:part name="campaignId" type="xsd:int"></wsdl:part>
	<wsdl:part name="action" type="xsd:string"></wsdl:part>
	<wsdl:part name="key" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_changeProjectResponse">
	<wsdl:part name="result" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_ComfirmRequestsRequest">
        <wsdl:part name="key" type="xsd:string"></wsdl:part>
        <wsdl:part name="postConfirm" type="typens:postConfirmArray"></wsdl:part>
	<wsdl:part name="action" type="xsd:string"></wsdl:part>
</wsdl:message>

<wsdl:message name="blogunApi_ComfirmRequestsResponse">
	<wsdl:part name="result" type="typens:ResponseArray"></wsdl:part>
</wsdl:message>

<wsdl:portType name="BlogunApiPortType">	
        <wsdl:operation name="blogunApi_login">
                <wsdl:input message="typens:blogunApi_loginRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_loginResponse"></wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="blogunApi_logout">
                <wsdl:input message="typens:blogunApi_logoutRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_logoutResponse"></wsdl:output>		
        </wsdl:operation>

        <wsdl:operation name="blogunApi_getProjects">
                <wsdl:documentation>Returns information about the user campaigns</wsdl:documentation>		
                <wsdl:input message="typens:blogunApi_getProjectsRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_getProjectsResponse"></wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="blogunApi_getBlogs">
                <wsdl:documentation>
                        Returns blogs information
                        limit 100 items
                </wsdl:documentation>		
                <wsdl:input message="typens:blogunApi_getBlogsRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_getBlogsResponse"></wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="blogunApi_getRequests">
                <wsdl:documentation>
                        Returns blogs information
                        limit 100 items
                </wsdl:documentation>		
                <wsdl:input message="typens:blogunApi_getRequestsRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_getRequestsResponse"></wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="blogunApi_getBalance">
                <wsdl:documentation> Returns the current balance of user </wsdl:documentation>		
                <wsdl:input message="typens:blogunApi_getBalanceRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_getBalanceResponse"></wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="blogunApi_getProjectInfo">
                <wsdl:input message="typens:blogunApi_getProjectInfoRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_getProjectInfoResponse"></wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="blogunApi_changeProject">
                <wsdl:input message="typens:blogunApi_changeProjectRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_changeProjectResponse"></wsdl:output>
        </wsdl:operation>	

        <wsdl:operation name="blogunApi_ComfirmRequests">
                <wsdl:documentation>Действия могут быть следующими: declined, accepted, pricechanged</wsdl:documentation>		
                <wsdl:input message="typens:blogunApi_ComfirmRequestsRequest"></wsdl:input>
                <wsdl:output message="typens:blogunApi_ComfirmRequestsResponse"></wsdl:output>
        </wsdl:operation>
</wsdl:portType>

<wsdl:binding name="BlogunApiBinding" type="typens:BlogunApiPortType">
	<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
	
	<wsdl:operation name="blogunApi_login">
		<soap:operation soapAction="blogun.ru/blogun/soap/blogunApi_login"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
	
	<wsdl:operation name="blogunApi_logout">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
			
	<wsdl:operation name="blogunApi_getProjects">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
    
        <wsdl:operation name="blogunApi_getBlogs">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
    
        <wsdl:operation name="blogunApi_getRequests">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
	
	<wsdl:operation name="blogunApi_getBalance">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
	
	<wsdl:operation name="blogunApi_getProjectInfo">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
	
	<wsdl:operation name="blogunApi_changeProject">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>
    
        <wsdl:operation name="blogunApi_ComfirmRequests">
		<soap:operation soapAction="blogun.ru/blogun/soap"/>
		<wsdl:input>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:input>
		<wsdl:output>
			<soap:body use="encoded" namespace="blogun.ru/blogun/soap" 
				encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
		</wsdl:output>
	</wsdl:operation>		
</wsdl:binding>

<wsdl:service name="BlogunApiService">
	<wsdl:port name="BlogunApiPortType" binding="typens:BlogunApiBinding">
		<soap:address location="https://blogun.ru/api/blogun_api.php"/>
	</wsdl:port>
</wsdl:service>

</wsdl:definitions>
