
    ?d                         d dl Z d dlZd dlmZ  edd          Z edd          Z edd	          Z G d
 d          ZdS )    N)configAPI_KEY 35a15b812a541ac37eeea476dc446242defaultSHARED_SECRET 2551e32b3f42e0a0d16a29788fb23809API_VERSIONz2023-01c                   |    e Zd Zed             Zed             Zed             Zed             Zed             ZdS )
Assets_Apic                     d}d| dt           d}d|i}t          j        ||          }|j        dk    r|j        }ndd	i}t          j        |          S )
N https:///admin/api/z/themes.jsonX-Shopify-Access-Tokenurlheaders   errorAPI Not Called)r
   requestsgetstatus_codetextjsonloads)shoptokenget_datar   headerrs         5C:\Users\Nilesh\Desktop\Matress\matress\ShopifyApi.py	get_themezAssets_Api.get_theme   sv    59TT;;;G %e
 ,3v
.
.
.=CvHH (H z(###    c                 l   dt           dt          d|dt          d| d}|dt           t          d}d	d
dt          dd          z  di}t	          j        |||          }t          |j        d           t          |j                   |j        dk    rt          j
        |j                  }|S d}|S )Nr   :@r   /themes//assets.jsonapplication/jsonr   zContent-Type	client_idclient_secretassetzassets/sleepezee.cssz&https://%s/static/project/frontend.csstunnelmatress.3iwebexperts.comr   keysrcr   r   r   cssr   r   r   r   r
   r   r   putprintr   r   r   r   theme_idr   r   r   r!   datar"   cs           r#   set_csszAssets_Api.set_css    s     GNwwP]P]P]_c_c_cepepeprzrzrz{ ',. *	
 
 -?ZtAuAuAuv 
 LS&t<<<amU###af=C
16""AHAHr%   c                 l   dt           dt          d|dt          d| d}|dt           t          d}d	d
dt          dd          z  di}t	          j        |||          }t          |j        d           t          |j                   |j        dk    rt          j
        |j                  }|S d}|S )Nr   r'   r(   r   r)   r*   r+   r,   r/   zassets/sleepezee.jsz%https://%s/static/project/frontend.jsr0   r1   r   r2   r5   jsr   r   r7   r:   s           r#   set_jszAssets_Api.set_js<   s     GNwwP]P]P]_c_c_cepepeprzrzrz{ ',. *	
 
 ,>xYs@t@t@tu 
 LS&t<<<amT"""af=C
16""AHAHr%   c                 H   dt           dt          d|dt          d| d}|dt           t          d}d	d
ddi}t          j        |||          }t          |j        d           t          |j                   |j        dk    rt          j	        |j                  }|S d}|S )Nr   r'   r(   r   r)   r*   r+   r,   r/   zsections/sleepezee.liquidak
  <label for="name">Name:</label><input id="name" name="name" required pattern="[a-zA-Z\s]+"><label for="contactNumber">Contact Number:</label><input id="contactNumber" name="contactNumber" required pattern="[0-9]+"><label for="city">City:</label><input id="city" name="city" required pattern="[a-zA-Z\s]+"><label for="email">Email:</label><input type="email" id="email" name="email" required><label for="gender">Gender:</label><select id="gender" name="gender" required><option value="">Select</option><option value="male">Male</option><option value="female">Female</option><option value="other">Other</option></select><label for="age">Age:</label><input type="number" id="age" name="age" required><label for="height">Height:</label><input id="height" name="height" required><label for="weight">Weight (in kg):</label><input type="number" id="weight" name="weight" required><label for="getting_out_of_bed">Getting Out Of Bed:</label><select id="getting_out_of_bed" name="getting_out_of_bed" required><option value="">Select</option><option value="Some difficulty">Some Difficulty</option><option value="No difficulty">No Difficulty</option><option value="Very difficult">Very Difficult</option><option value="Completely unable to do">Completely unable to do</option></select><div><label for="driving_and_sitting_in_a_car_or_bus">Driving and sitting in a car or bus:</label><select id="driving_and_sitting_in_a_car_or_bus" name="driving_and_sitting_in_a_car_or_bus"><option value="">Select</option><option value="Some difficulty">Some difficulty</option><option value="No difficulty">No difficulty</option><option value="Very difficult">Very difficult</option><option value="Completely unable to do">Completely unable to do</option></select></div><div><label for="climbing_15_to_20_stairs">Climbing 15 to 20 stairs:</label><select id="climbing_15_to_20_stairs" name="climbing_15_to_20_stairs"><option value="">Select</option><option value="Some difficulty">Some difficulty</option><option value="No difficulty">No difficulty</option><option value="Very difficult">Very difficult</option><option value="Completely unable to do">Completely unable to do</option></select></div><div><label for="lifting_and_carrying_bag_luggage">Lifting and carrying bag/luggage:</label><select id="lifting_and_carrying_bag_luggage" name="lifting_and_carrying_bag_luggage"><option value="">Select</option><option value="Some difficulty">Some difficulty</option><option value="No difficulty">No difficulty</option><option value="Very difficult">Very difficult</option><option value="Completely unable to do">Completely unable to do</option></select></div><input type="submit" value="Submit">)r3   valuer5   liquidr   r   )
r   r   r
   r   r8   r9   r   r   r   r   r:   s           r#   
set_liquidzAssets_Api.set_liquidX   s     GNwwP]P]P]_c_c_cepepeprzrzrz{ ',. *	
 
 2 G* 
 LS&t<<<amX&&&af=C
16""AHAHr%   c                     i }d| dt           d}d|i}t          j        ||          }|j        dk    r+t	          j        |j                  }|d         d         |d	<   nd
|d<   |S )Nr   r   z
/shop.jsonr   r   r   r   emailowner_emailr   r   )r
   r   r   r   r   r   r   )r   r   r    r   r!   r"   r<   s          r#   	get_emailzAssets_Api.get_emailt   s    3744E %e
 ,3v
.
.
.=C:af%%D&*6l7&;H]## 0HWr%   N)	__name__
__module____qualname__staticmethodr$   r>   rA   rE   rI    r%   r#   r   r   
   s        $ $ \$(   \6   \6   \6   \  r%   r   )r   r   decoupler   r   r   r
   r   rN   r%   r#   <module>rP      s           
&$F
G
G
G0RSSSf]I666| | | | | | | | | |r%   