Skip to content

Commit

Permalink
Merge pull request #158 from sil-vio/main
Browse files Browse the repository at this point in the history
fix: #156
  • Loading branch information
peppelinux committed Feb 16, 2023
2 parents 67e8720 + d541ccd commit 95d5a94
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/spid_sp_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


BASE_DIR = Path(__file__).resolve().parent
__version__ = "1.2.12"
__version__ = "1.2.13"
__name__ = "spid_sp_test"
logger = logging.getLogger(__name__)

Expand Down
16 changes: 8 additions & 8 deletions src/spid_sp_test/indicepa.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
import requests


API_URL = "https://indicepa.gov.it/PortaleServices/api/aoo"
API_URL = "https://www.indicepa.gov.it/PortaleServices/api/ente/ricerca"
logger = logging.getLogger(__name__)


def get_indicepa_by_ipacode(value):
qs = """
{"paginazione":
{"campoOrdinamento":"codAoo",
{"campoOrdinamento":"idEnte",
"tipoOrdinamento":"asc",
"paginaRichiesta":1,
"numTotalePagine":null,
"numeroRigheTotali":null,
"paginaCorrente":null,
"righePerPagina":null},
"codiceFiscale":null,
"codUniAoo":null,
"desAoo":null,
"denominazioneEnte":null,
"codiceFiscaleRicerca":null,
"area":null,
"denominazione":null,
"codEnte":"$IPACode",
"codiceCategoria":null,
"area":null
"idTipoServizioDigitale":null,
"lingueMinoritarie":null,
"codiceCategoria":null
}"""

qs_final = qs.replace("$IPACode", value)
Expand Down
3 changes: 3 additions & 0 deletions tests/test_04_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ def test_indicepa():

def test_indicepa_2():
res = get_indicepa_by_ipacode('r_vda')

def test_indicepa_3():
res = get_indicepa_by_ipacode('cnpaf_0')

0 comments on commit 95d5a94

Please sign in to comment.